pre-commit
setup
install pre-commit
$ python -m pip install --user pipx
$ pipx ensurepath
$ pipx install pre-commit
# or
$ brew install --HEAD pre-commitinit hook in repo
run
migrate-config
hooks
[!NOTE|labels:reference:]
sample config
update to repo's latest version
copyright manager
[!NOTE|labels:reference:]
checker and fixer
mixed-line-ending
--fix OPTIONS
COMMENTS
auto
auto-detect line-ending
no
no change line-ending
cr
force use (legacy Mac)
crlf
force use \r(Windows)
lf
force use (Unix/Linux/macOS)
convert tab to spaces
expand+spongepython solution
typos
Last updated
Was this helpful?