We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
As the title says.
(Thank you very much for support of multiple exclude!)
exclude
1.7.5 d7ae5f7
Repository: https://github.com/pvcresin/lefthook-exclude-test
package.json
{ "devDependencies": { "lefthook": "^1.7.5", "prettier": "^3.3.3" } }
lefthook.yml
--- pre-commit: parallel: true commands: format: glob: "*.js" # exclude: "b.js|c.js" # worked correctly exclude: - b.js - c.js run: | echo {staged_files} npx prettier --write {staged_files} stage_fixed: true
If I try to commit a.js, b.js, c.js, I want to format only a.js by prettier.
exclude: “b.js|c.js” # worked correctly.
exclude: # did not seem to work correctly. - b.js - c.js
exclude: - b.js - c.js
If I try to commit a.js, b.js, c.js, only a.js is formatted
If I try to commit a.js, b.js, c.js, all a.js, b.js, c.js are formatted. 😢
It might be more correct to append if v did not match all globs
https://github.com/evilmartians/lefthook/pull/777/files#diff-95baf66be56f3f284ac7a6f45870dbff51131728ff6cfa163e9eac9721229697R94-R97
LEFTHOOK_VERBOSE=true git ...
The text was updated successfully, but these errors were encountered:
@mrexox seems to know more about it.
Sorry, something went wrong.
Hey @pvcresin! Thank you for submitting a bug. The fix will be ready soon
Successfully merging a pull request may close this issue.
🔧 Summary
As the title says.
(Thank you very much for support of multiple
exclude
!)Lefthook version
1.7.5 d7ae5f7
Steps to reproduce
Repository: https://github.com/pvcresin/lefthook-exclude-test
package.json
lefthook.yml
If I try to commit a.js, b.js, c.js, I want to format only a.js by prettier.
Expected results
If I try to commit a.js, b.js, c.js, only a.js is formatted
Actual results
If I try to commit a.js, b.js, c.js, all a.js, b.js, c.js are formatted. 😢
Possible Solution
It might be more correct to append if v did not match all globs
https://github.com/evilmartians/lefthook/pull/777/files#diff-95baf66be56f3f284ac7a6f45870dbff51131728ff6cfa163e9eac9721229697R94-R97
Logs / Screenshots
The text was updated successfully, but these errors were encountered: