But you can use -n of xargs to run mix credo sequentially for each file.
Still, you really shouldn’t do that. To get the most benefit from credo, you should always let it scan the full project, or it won’t find some of the consistency stuff.
Interesting, my intent with only running it on the staged files is because I know the rest of my code might still be WIP, and might fail the linter check.
I also plan on running credo on my CI, which would run it on every file. With your statement in mind, am I correct in guessing that credo may fail on CI (running on every file) even if it passed in my pre-commit hook (running on a subset of files)?