Closed pierrelegall closed 10 months ago
I am trying to check multiple files with Credo, not all my project.
When I use mix credo file.ex, it works as expected. However, this is not the case when you check multiple file (e.g. mix credo file1.ex file2.ex).
mix credo file.ex
mix credo file1.ex file2.ex
In my case, this is useful to speed up my pre-commit Git hook as below:
#!/bin/sh set -e STAGED_FILES=$(git diff --name-only --cached) mix credo $STAGED_FILES
Bug or feature? That is the question.
Every listed files should be checked by Credo.
Only the first file is checked by Credo.
This is now possible. Please re-open if you run into any issues 👍
Environment
What was I trying to do?
I am trying to check multiple files with Credo, not all my project.
When I use
mix credo file.ex
, it works as expected. However, this is not the case when you check multiple file (e.g.mix credo file1.ex file2.ex
).In my case, this is useful to speed up my pre-commit Git hook as below:
Bug or feature? That is the question.
Expected outcome
Every listed files should be checked by Credo.
Actual outcome
Only the first file is checked by Credo.