pre-commit and its RiiR sibling prek manage a bunch of different pre-commit hooks which could make development more consistent. They are broadly compatible, with prek being faster and more efficient for most common actions.
Using prek, I tried
- trailing-whitespace
- end-of-file-fixer
- check-yaml
- check-json
- pretty-format-json
- mixed-line-ending, fix=lf
- proselint
- typos
- codespell
Most are from prek's builtins; a few are from pre-commit's recommendations.
Any of them will introduce quite a lot of non-meaningful git churn and so should be added immediately after a release, ideally one at a time.
In particular, end-of-file-fixer and pretty-format-json edit a lot of the JSON examples.
proselint helped me fix some issues but gets a few false positives on helpful lints, so we may not be able to use it here.
codespell didn't find anything useful.
typos found some false positives which could be configured around (e.g. flagging "OME" as a misspelling of "some"), but then didn't find some other actual typos.
These should probably be omitted.
pre-commit and its RiiR sibling prek manage a bunch of different pre-commit hooks which could make development more consistent. They are broadly compatible, with prek being faster and more efficient for most common actions.
Using prek, I tried
Most are from prek's builtins; a few are from pre-commit's recommendations.
Any of them will introduce quite a lot of non-meaningful git churn and so should be added immediately after a release, ideally one at a time.
In particular, end-of-file-fixer and pretty-format-json edit a lot of the JSON examples.
proselint helped me fix some issues but gets a few false positives on helpful lints, so we may not be able to use it here.
codespell didn't find anything useful.
typos found some false positives which could be configured around (e.g. flagging "OME" as a misspelling of "some"), but then didn't find some other actual typos.
These should probably be omitted.