Summary
I'm trying to add a slow job to prek that will only be run when explicitly specified, via prek run job_id. The reason I want to do this is because:
- we already use the
manual stage to select a subset of jobs to run when a file is saved
- this tool exits 0 even if it makes changes to the repo, and wrapping it in prek gets us nice error handling
I assumed I could do stages: [], and the tool would never run in any stage unless explicitly specified on the command line. Instead, stages: [] seems to be equivalent to stages: ~; that is to say, it selects all stages instead of none.
Could prek support this empty stages list, or, alternatively, could we make custom stages? Basically I want two different manual stages so that I can do prek run --stage group_a or prek run --stage group_b (and crucially, I'd like to have checks in these groups that don't run during any other stage). I was hoping that clearing stages would get this to work.
Willing to submit a PR?
Platform
Linux 5.15.0-135-generic x86_64 GNU/Linux
Version
prek 0.3.4
.pre-commit-config.yaml
Not relevant
Log file
Not relevant
Summary
I'm trying to add a slow job to prek that will only be run when explicitly specified, via
prek run job_id. The reason I want to do this is because:manualstage to select a subset of jobs to run when a file is savedI assumed I could do
stages: [], and the tool would never run in any stage unless explicitly specified on the command line. Instead,stages: []seems to be equivalent tostages: ~; that is to say, it selects all stages instead of none.Could
preksupport this empty stages list, or, alternatively, could we make custom stages? Basically I want two different manual stages so that I can doprek run --stage group_aorprek run --stage group_b(and crucially, I'd like to have checks in these groups that don't run during any other stage). I was hoping that clearingstageswould get this to work.Willing to submit a PR?
Platform
Linux 5.15.0-135-generic x86_64 GNU/Linux
Version
prek 0.3.4
.pre-commit-config.yaml
Not relevant
Log file
Not relevant