Releases · pre-commit/pre-commit-hooks
pre-commit-hooks v6.0.0
Fixes
check-shebang-scripts-are-executable: improve error message.
Migrating
- now requires python >= 3.9.
file-contents-sorter: disallow --unique and --ignore-case at the same
time.
- Removed
check-byte-order-marker and fix-encoding-pragma.
check-byte-order-marker: migrate to fix-byte-order-marker.
fix-encoding-pragma: migrate to pyupgrade.
- #1034 PR by @mxr.
- #1032 issue by @mxr.
- #522 PR by @jgowdy.
pre-commit-hooks v5.0.0
Features
requirements-txt-fixer: also remove pkg_resources==....
check-illegal-windows-names: new hook!
pretty-format-json: continue processing even if a file has a json error.
Fixes
destroyed-symlinks: set stages to [pre-commit, pre-push, manual]
Migrating
- pre-commit-hooks now requires
pre-commit>=3.2.0.
- use non-deprecated names for
stages.
pre-commit-hooks v4.6.0
Features
requirements-txt-fixer: remove duplicate packages.
Migrating
fix-encoding-pragma: deprecated -- will be removed in 5.0.0. use
pyupgrade or some other tool.
pre-commit-hooks v4.5.0
Features
requirements-txt-fixer: also sort constraints.txt by default.
debug-statements: add bpdb debugger.
Fixes
file-contents-sorter: fix sorting an empty file.
double-quote-string-fixer: don't rewrite inside f-strings in 3.12+.
Migrating
- now requires python >= 3.8.
pre-commit-hooks v4.4.0
Features
- forbid-submodules: new hook which outright bans submodules.
pre-commit-hooks v4.3.0
Features
check-executables-have-shebangs: use git config core.fileMode to determine if it should query git.
name-tests-test: add --pytest-test-first test convention.
Fixes
check-shebang-scripts-are-executable: update windows instructions.
check-toml: use stdlib tomllib when available.
check-added-large-files: don't run on non-file stages.
pre-commit-hooks v4.2.0
Features
name-tests-test: updated display text.
check-docstring-first: make output more parsable.
check-merge-conflict: make output more parsable.
debug-statements: make output more parsable.
Fixes
check-merge-conflict: fix detection of ====== conflict marker on windows.
Updating
- Drop python<3.7.
- Changed default branch from
master to main.
pre-commit-hooks v4.1.0
Features
debug-statements: add pdbr debugger.
detect-private-key: add detection for additional key types.
check-executables-have-shebangs: improve messaging on windows.
check-added-large-files: support --enforce-all with git-lfs.
Fixes
check-case-conflict: improve performance.
forbid-new-submodules: fix false-negatives for pre-push.
check-merge-conflict: fix execution in git worktrees.
Misc.
- Normalize case of hook names and descriptions.
pre-commit-hooks v4.0.1
Fixes
check-shebang-scripts-are-executable fix entry point.
pre-commit-hooks v4.0.0
Features
check-json: report duplicate keys.
no-commit-to-branch: add main to default blocked branches.
check-case-conflict: check conflicts in directory names as well.
check-vcs-permalinks: forbid other branch names.
check-shebang-scripts-are-executable: new hook which ensures shebang'd scripts are executable.
Fixes
check-executables-have-shebangs: Short circuit shebang lookup on windows.
requirements-txt-fixer: Fix comments which have indentation
pretty-format-json: write to stdout using UTF-8 encoding.
- Use more inclusive language.
Breaking changes
- Remove deprecated hooks:
flake8, pyflakes, autopep8-wrapper.