error: Justfile does not contain recipes when pre-committing #1984
Unanswered
AlessandroMiola
asked this question in
Q&A
Replies: 1 comment
-
I came across this question while trying to solve the same problem and wanted to share something I have just discovered. If I add I don't know if this is the best/right solution but I would be interested to know what others think and why it's necessary to add it to get pre-commit to work nicely with just. Thanks. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm referencing
just
commands in custompre-commit
hooks. For some reason,just
is interpreting staged files as recipes, which leads toMy project tree is as follows (at least to what pertains to the files listed within the error message):
My
.pre-commit-config.yaml
is as follows:My
justfile
is as follows:Versions:
Ofc, substituting [
poetry run ruff check --fix .
] to [just ruff-fix
] and [poetry run ruff format .
] to [just ruff-format
] into.pre-commit-config.yaml
just :) works, but I'd like to usejust
commands.Can someone help? What am I doing wrong? A similar setup used to work elsewhere for me.
Beta Was this translation helpful? Give feedback.
All reactions