Features
- Allow
--hook-type
to be specified multiple times.- example:
pre-commit install --hook-type pre-commit --hook-type pre-push
- #1139 issue by @MaxymVlasov.
- #1145 PR by @asottile.
- example:
- Include more version information in crash logs.
- #1142 by @marqueewinq.
- Hook colors are now passed through on platforms which support
pty
. - pre-commit now uses
importlib.metadata
directly when running in python 3.8 - Normalize paths to forward slash separators on windows.
- makes it easier to match paths with
files:
regex - avoids some quoting bugs in shell-based hooks
- #1173 issue by @steigenTI.
- #1179 PR by @asottile.
- makes it easier to match paths with
Fixes
- Remove some extra newlines from error messages.
- When a hook is not executable it now reports
not executable
instead ofnot found
.- #1159 issue by @nixjdm.
- #1161 PR by @WillKoehrsen.
- Fix interleaving of stdout / stderr in hooks.
- Fix python environment
healthy()
check when current working directory contains modules which shadow standard library names.
Updating
- Regexes handling both backslashes and forward slashes for directory separators now only need to handle forward slashes.