Conversation
|
Other repos such as https://github.com/crate-ci/typos/ document pre-commit integration, see https://github.com/crate-ci/typos/blob/master/docs/pre-commit.md. Should we do that in this repo as well? |
|
Thank you for the contribution! I may not have overlooked this in the release if it were documented, so it would be nice to add that to the Plugins section of the README. Speaking of which, you are right, automated testing of the vendored plugins in question would be useful. Would you like to open PRs for those too? |
There was a problem hiding this comment.
Should the hook run on all text files? I fear this would return a lot of false-positives.
Naturally, right now proselint support for anything besides plain-text is "limited" (at least till docile progresses), but we could put some more standard file types till then, or document this caveat and let the user configure inputs themselves.
Thinking out loud here: if we had the machinery for rulesets (as in #1406), it could reduce friction for users to have different rulesets for non-plaintext files. I would be wary about this inconsistency constituting unexpected behaviour, so it might be better to turn off checks that cause issues for various file types by default.
We should narrow |
|
Thanks, constrained file types in 4a47cff. I didn't include .rtf, as that's really unusual in git-based environments in my experience) and pre-commit's identify framework doesn't support this extension. |
|
@drainpixie @Nytelife26 these are the final changes in this PR, sorry for making your reviews stale: I updated the readme to demonstrate the pre-commit config. Is it ok to list this among the other installation options? |
Signed-off-by: Chris Bachhuber <cbachhuber89@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1465 +/- ##
=======================================
Coverage 92.56% 92.56%
=======================================
Files 100 100
Lines 1022 1022
=======================================
Hits 946 946
Misses 76 76
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Relevant issues
With proselint integrated into my pre-commit config like
I get
Brief
Fix the offered pre-commit hook.
Changes
Since proselint expects a list of files after the
checkcommand, pass that command to it in thepre-commit-hooks.yamlconfig, such that users don't have to. This fixes my manual test, do we want a continuous test for this?