nevinera / quiet_quality

A system for finding and annotating quality issues on your forward diffs
MIT License
12 stars 0 forks source link

Allow the `command` to be overridden for certain tools #96

Closed nevinera closed 6 months ago

nevinera commented 1 year ago

This is mostly to enable further tools, but it could be useful for things like rspec as well. Right now, the runners define their own commands, but we could allow users to customize those commands through the configuration file:

rspec:
  changed_files: true
  filter_messages: false
  base_command: "rspec --fail-false -f json"
  environment:
    SIMPLECOV: "false"
    INTEGRATION_TESTING: "false"

We'd need to update the commands to be handled as strings instead of arrays of arguments, which means passing them through bash.. probably not a big deal. We'd also need to handle the supplying of additional environment variables via the usual spawn interface, which I think capture3 supports.

nevinera commented 1 year ago

One of the interesting things this allows is a custom tool, which requires both a supplied base command and a parser command that uses jq (or probably a script from your repository) to rewrite the output of whatever tool you're using into a json format we specify so the 'Custom::Parser' can read it. There's a lot to work out there, since there's no reason to restrict them to one custom tool..

nevinera commented 7 months ago

(alternatively, we can stick with the array-of-args approach, and only support overriding commands via config file, OR we could just do naive arg splitting ourselves if we get a string here).

cdimartino commented 7 months ago

Could accept an array of args in yaml also.

nevinera commented 6 months ago

Okay, I'm choosing an approach and splitting this ticket up.

  1. Array of args, yaml-only (#125)
  2. Support supplying environment to runners through yaml (#123)
  3. Support overriding the command for an individual runner on the cli (#124)
nevinera commented 6 months ago

Sliced up, closing in favor of the slices