nevinera / quiet_quality

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

Add a way to 'exec' a single tool #108

Closed nevinera closed 11 months ago

nevinera commented 11 months ago

In some cases the tools are slow enough that you don't want to run them bundled together, or you want to see the normal output of a tool instead of the reformatted qq output. Of course, you can just run the tool yourself, but there's one main thing that qq does for you that's annoying to do yourself - working out which files to run it against.

This change adds a --exec/-X TOOL flag that allows you to let qq do the work to construct the command for you and then execute it, but instead of managing a flock of processes and merging/reformatting their output, it just _exec_s the command, and lets it handles its output.

For each runner, we specify/construct an exec_command (which is always currently the normal command, but without the 'give me json please' flags). If the Entrypoint gets the exec flag, it'll ignore any other tools it's told to run (whether by default, or because you listed them on the command-line), and just exec that tool with the flags it would normally run with. Keep in mind that many of the flags you can supply to qq will not matter, since we're not handling/parsing the output of the tool.

(This will resolve #105)