check-shebang-scripts-are-executable: improve error message.- #1115 PR by @homebysix.
- now requires python >= 3.9.
- #1098 PR by @asottile.
file-contents-sorter: disallow--uniqueand--ignore-caseat the same time.- #1095 PR by @nemacysts.
- #794 issue by @teksturi.
- Removed
check-byte-order-markerandfix-encoding-pragma.check-byte-order-marker: migrate tofix-byte-order-marker.fix-encoding-pragma: migrate topyupgrade.- #1034 PR by @mxr.
- #1032 issue by @mxr.
- #522 PR by @jgowdy.
requirements-txt-fixer: also removepkg_resources==....- #850 PR by @ericfrederich.
- #1030 issue by @ericfrederich.
check-illegal-windows-names: new hook!- #1044 PR by @ericfrederich.
- #589 issue by @ericfrederich.
- #1049 PR by @Jeffrey-Lim.
pretty-format-json: continue processing even if a file has a json error.- #1039 PR by @amarvin.
- #1038 issue by @amarvin.
destroyed-symlinks: setstagesto[pre-commit, pre-push, manual]- PR #1085 by @AdrianDC.
- pre-commit-hooks now requires
pre-commit>=3.2.0. - use non-deprecated names for
stages.- #1093 PR by @asottile.
requirements-txt-fixer: remove duplicate packages.- #1014 PR by @vhoulbreque-withings.
- #960 issue @csibe17.
fix-encoding-pragma: deprecated -- will be removed in 5.0.0. use pyupgrade or some other tool.- #1033 PR by @mxr.
- #1032 issue by @mxr.
requirements-txt-fixer: also sortconstraints.txtby default.- #857 PR by @lev-blit.
- #830 issue by @PLPeeters.
debug-statements: addbpdbdebugger.- #942 PR by @mwip.
- #941 issue by @mwip.
file-contents-sorter: fix sorting an empty file.- #944 PR by @RoelAdriaans.
- #935 issue by @paduszyk.
double-quote-string-fixer: don't rewrite inside f-strings in 3.12+.- #973 PR by @asottile.
- #971 issue by @XuehaiPan.
- now requires python >= 3.8.
- #926 PR by @asottile.
- #927 PR by @asottile.
forbid-submodules: new hook which outright bans submodules.- #815 PR by @asottile.
- #707 issue by @ChiefGokhlayeh.
check-executables-have-shebangs: usegit config core.fileModeto determine if it should querygit.- #730 PR by @Kurt-von-Laven.
name-tests-test: add--pytest-test-firsttest convention.- #779 PR by @asottile.
check-shebang-scripts-are-executable: update windows instructions.- #774 PR by @mdeweerd.
- #770 issue by @mdeweerd.
check-toml: use stdlibtomllibwhen available.- #771 PR by @DanielNoord.
- #755 issue by @sognetic.
check-added-large-files: don't run on non-filestages.- #778 PR by @asottile.
- #777 issue by @skyj.
name-tests-test: updated display text.- #713 PR by @asottile.
check-docstring-first: make output more parsable.- #748 PR by @asottile.
check-merge-conflict: make output more parsable.- #748 PR by @asottile.
debug-statements: make output more parsable.- #748 PR by @asottile.
check-merge-conflict: fix detection of======conflict marker on windows.- #748 PR by @asottile.
- Drop python<3.7.
- #719 PR by @asottile.
- Changed default branch from
mastertomain.- #744 PR by @asottile.
debug-statements: addpdbrdebugger.- #614 PR by @cansarigol.
detect-private-key: add detection for additional key types.- #658 PR by @ljmf00.
check-executables-have-shebangs: improve messaging on windows.- #689 PR by @pujitm.
- #686 issue by @jmerdich.
check-added-large-files: support--enforce-allwithgit-lfs.- #674 PR by @amartani.
- #560 issue by @jeremy-coulon.
check-case-conflict: improve performance.- #626 PR by @guykisel.
- #625 issue by @guykisel.
forbid-new-submodules: fix false-negatives forpre-push.- #619 PR by @m-khvoinitsky.
- #609 issue by @m-khvoinitsky.
check-merge-conflict: fix execution in git worktrees.- #662 PR by @errsyn.
- #638 issue by @daschuer.
- Normalize case of hook names and descriptions.
- #671 PR by @dennisroche.
- #673 PR by @revolter.
check-shebang-scripts-are-executablefix entry point.- #602 issue by @Person-93.
- #603 PR by @scop.
check-json: report duplicate keys.- #558 PR by @AdityaKhursale.
- #554 issue by @adamchainz.
no-commit-to-branch: addmainto default blocked branches.- #565 PR by @ndevenish.
check-case-conflict: check conflicts in directory names as well.- #575 PR by @slsyy.
- #70 issue by @andyjack.
check-vcs-permalinks: forbid other branch names.- #582 PR by @jack1142.
- #581 issue by @jack1142.
check-shebang-scripts-are-executable: new hook which ensures shebang'd scripts are executable.- #545 PR by @scop.
check-executables-have-shebangs: Short circuit shebang lookup on windows.- #544 PR by @scop.
requirements-txt-fixer: Fix comments which have indentation- #549 PR by @greshilov.
- #548 issue by @greshilov.
pretty-format-json: write to stdout using UTF-8 encoding.- #571 PR by @jack1142.
- #570 issue by @jack1142.
- Use more inclusive language.
- #599 PR by @asottile.
- Remove deprecated hooks:
flake8,pyflakes,autopep8-wrapper.- #597 PR by @asottile.
file-contents-sorter: Add--uniqueargument- #524 PR by @danielhoherd.
check-vcs-permalinks: Add--additional-github-domainoption- #530 PR by @youngminz.
- New hook:
destroyed-symlinksto detect unintentional symlink-breakages on windows.- #511 PR by @m-khvoinitsky.
file-contents-sorter: add--ignore-caseoption for case-insensitive sorting- #514 PR by @Julian.
check-added-large-files: add--enforce-alloption to check non-added files as well- #519 PR by @mshawcroft.
- #518 issue by @mshawcroft.
fix-byte-order-marker: new hook which fixes UTF-8 byte-order marker.- #522 PR by @jgowdy.
check-byte-order-markeris now deprecated forfix-byte-order-marker
debug-statements: add support forpydevd_pycharmdebugger- #502 PR by @jgeerds.
check-executables-have-shebangs: fix git-quoted files on windows (spaces, non-ascii, etc.)- #509 PR by @pawamoy.
- #508 issue by @pawamoy.
check-executables-have-shebangs: on windows, validate the mode bits usinggit- #480 PR by @mxr.
- #435 issue by @dstandish.
requirements-txt-fixer: support more operators- #483 PR by @mxr.
- #331 issue by @hackedd.
pre-commit-hooks-removed: Fix when removed hooks usedargs- #487 PR by @pedrocalleja.
- #485 issue by @pedrocalleja.
check-toml: use UTF-8 encoding to load toml files- #479 PR by @mxr.
- #474 issue by @staticdev.
detect-aws-credentials: skip empty aws keys- #450 PR by @begoon.
- #449 issue by @begoon.
debug-statements: add detectionwdbdebugger- #452 PR by @itsdkey.
- #451 issue by @itsdkey.
requirements-txt-fixer: support line continuation for dependencies- #469 PR by @aniketbhatnagar.
- #465 issue by @aniketbhatnagar.
detect-aws-credentials: fixUnicodeDecodeErrorwhen running on non-UTF8 files.- #453 PR by @asottile.
- #393 PR by @a7p
- #346 issue by @rpdelaney.
-
pre-commit/pre-commit-hooks now requires python3.6.1+
- #447 PR by @asottile.
- #455 PR by @asottile.
-
flake8/pyflakeshave been removed, useflake8frompycqa/flake8instead:- repo: https://gitlab.com/pycqa/flake8 rev: 3.8.1 hooks: - id: flake8
- #476 PR by @asottile.
- #477 PR by @asottile.
- #344 issue by @asottile.
- Fix sorting of requirements which use
egg=...- #425 PR by @vinayinvicible.
- Fix over-eager regular expression for test filename matching
- #429 PR by @rrauenza.
-
Use
flake8frompycqa/flake8instead:- repo: https://gitlab.com/pycqa/flake8 rev: 3.7.9 hooks: - id: flake8
- Add diff output to
pretty-format-jsonwhen run without--autofix.- #408 PR by @joepin.
- Add
--charsoption totrailing-whitespacefixer to control which characters are stripped instead of all whitespace.- #421 PR by @iconmaster5326.
- Fix
requirements-txt-fixerwhen file does not end in a newline.- #414 issue by @barakreif.
- #415 PR by @barakreif.
- Fix double printing of filename in
pretty-format-json.- #419 PR by @asottile.
- Add
rpdbto detected debuggers indebug-statements- #389 PR by @danlamanna.
- Add
check-tomlhook- #400 PR by @MarSoft.
- #400 PR by @ssbarnea.
- Add
__main__block topre_commit.file_contents_sorterso it can be invoked usingpython -m- #405 PR by @squeaky-pl.
- Fix
git-lfstests in azure pipelines- #403 PR by @ssbarnea.
- Handle CRLF line endings in
double-quote-string-fixer- #385 issue by @Trim21.
- #386 PR by @asottile.
- Handle CRLF line endings in
fix-encoding-pragma- #384 PR by @asottile.
- Use UTF-8 to load yaml files
- #377 issue by @roottool.
- #378 PR by @roottool.
- Switch from
pyyamltoruamel.yaml- This enforces (among other things) duplicate key checking in yaml.
- #351 PR by @asottile.
- Add a new
--patternoption tono-commit-to-branchfor regex matching branch names.- #375 issue by @marcjay.
- #376 PR by @marcjay.
- Set
require_serial: truefor flake8- flake8 internally uses multiprocessing.
- #358 PR by @asottile.
- Don't run
check-executables-have-shebangs/trailing-whitespacehooks during thecommit-msgstage.- #361 issue by @revolter.
- #362 PR by @revolter.
- Run
check-byte-order-markeragainsttypes: [text]- #371 PR by @tobywf.
- #372 PR by @tobywf.
- Do not require UTF-8-encoded files for
check-docstring-first- #345 issue by @x007007007.
- #374 PR by @asottile.
pre-commit-hooksnow is type checked with mypy.- #360 PR by @asottile.
- Detect PGP/GPG private keys in
detect-private-key- #329 PR by @rpdelaney.
- Report filenames when fixing files in
mixed-line-endings- #341 PR by @gimbo.
- #340 issuey by @gimbo.
- Handle CRLF / CR line endings in
end-of-file-fixer- #327 PR by @mtkennerly.
- Clarify and document arguments for
detect-aws-credentials- #333 PR by @rpdelaney.
- Clarify
autopep8-wrapperis deprecated in description- #343 PR by @TheKevJames.
autopep8-wrapperhas been moved to pre-commit/mirrors-autopep8- #92 issue by @asottile.
- #319 issue by @blaggacao.
- #321 PR by @asottile.
trailing-whitespacedefaults to--no-markdown-linebreak-ext- #310 issue by @asottile.
- #324 PR by @asottile.
hooks.yaml(legacy pre-commit hook metadata) deleted- #323 PR by @asottile.
- pre-
typescompatibility metadata removed- #323 PR @asottile.
- Correct documentation for
no-commit-to-branch- #318 PR by @milin.
- Minimum supported version of
pre-commitis now 0.15.0 - Use
autopep8from pre-commit/mirrors-autopep8 - To keep mardown hard linebreaks, for
trailing-whitespaceuseargs: [--markdown-linebreak-ext=md,markdown](the previous default value)
(Note: this is a tag-only release as no code changes occurred)
- Don't run
end-of-file-fixerduringcommit-msgstage- #315 issue by @revolter.
- #317 PR by @revolter.
no-commit-to-branch: allow--branchto be specified multiple times- #190 PR by @moas.
- #294 PR by @asottile.
check-merge-conflict: add--assume-in-mergeto force checks outside of a merge commit situation- #300 issue by @vinayinvicible.
- #301 PR by @vinayinvicible.
- Don't match whitespace in VCS urls
- #293 PR by @asottile.
- Fix invalid escape sequences
- #296 PR by @asottile.
- Fix
ResourcesWarnings- #297 PR by @asottile.
- Test against python3.7
- #304 PR by @expobrain.
- Add an
--unsafeargument tocheck-yamlto allow custom yaml tags- #273 issue by @blackillzone.
- #274 PR by @asottile.
- Automatically remove
pkg-resources==0.0.0inrequirements-txt-fixer- #275 PR by @nvtkaszpir.
- Detect
breakpoint()(python3.7+) indebug-statementshook.- #283 PR by @asottile.
- Detect sshcom and putty hooks in
detect-private-key- #287 PR by @vin01.
- Open files as UTF-8 (
autopep8-wrapper,check-docstring-first,double-quote-string-fixer)- #279 PR by @nvtkaszpir.
- Fix
AttributeErrorincheck-builtin-literalsfor some functions- #285 issue by @EgoWumpus.
- #286 PR by @asottile.
trailing-whitespaceentrypoint was incorrect.- f6780b9 by @asottile.
trailing-whitespaceno longer adds a missing newline at end-of-file- #270 issue by @fractos.
- #271 PR by @asottile.
(Note: this is a tag-only release as no code changes occurred)
- Don't pass filenames for
no-commit-to-branch- #268 issue by @dongyuzheng.
- #269 PR by @asottile.
detect-aws-credentialsfalse positive when key was empty- #258 issue by @PVSec.
- #260 PR by @PVSec.
no-commit-to-branchno longer crashes when not on a branch- #265 issue by @hectorv.
- #266 PR by @asottile.
- Add new
check-builtin-literalshook.- #249 #251 PR by @benwebber.
pretty-format-jsonno longer depends onsimplejson.- #254 PR by @cas--.
detect-private-keynow detects gcp keys.- #255 issue by @SaMnCo @nicain.
- #256 PR by @nicain.
- Fix output interleaving in
check-vcs-permalinksunder python3.- #245 PR by @asottile.
check-yamlgains a--allow-multiple-documents(-m) argument to allow linting of files using the multi document syntax- pre-commit/pre-commit#635 issue by @geekobi.
- #244 PR by @asottile.
- New hook:
check-vcs-permalinksfor ensuring permalinked github urls.- #241 PR by @asottile.
- Fix
trailing-whitespacefor non-utf8 files on macos- #242 PR by @asottile.
- Fix
requirements-txt-fixerfor files ending in comments- #243 PR by @asottile.
- Fix mixed-line-endings
--fix=...when whole file is a different ending
- Fix entry point for
mixed-line-ending
- New hook:
mixed-line-ending
- Report full python version in
check-ast. - Apply a more strict regular expression for
name-tests-test - Upgrade binding for
git-lfsforcheck-added-large-files. The oldest version that is supported is 2.2.1 (2.2.0 will incorrectly refer to all files as "lfs" (false negative) and earlier versions will crash. debug-statementsnow works for non-utf-8 files.
- Add
check-executables-have-shebangshook.
- Add
sort-simple-yamlhook - Fix
requirements-txt-fixerfor empty files - Add
file-contents-sorterhook for sorting flat files check-merge-conflictnow recognizes rebase conflicts- Metadata now uses
types(and therefore requires pre-commit 0.15.0). This allows the text processing hooks to match all text files (and to match files which would only be classifiable by their shebangs).
- Add flag allowing missing keys to
detect-aws-credentials - Handle django default
tests.pyinname-tests-test - Add
--no-ensure-asciioption topretty-format-json - Add
no-commit-to-branchhook
- Don't false positive on files where trailing whitespace isn't changed.
- Improve search for detecting aws keys
- Add .pre-commit-hooks.yaml for forward compatibility
- trailing-whitespace-hook: restore original file on catastrophic failure
- trailing-whitespace-hook: support crlf
- check-yaml: Use safe_load
- check-json: allow custom key sort
- check-json: display filename for non-utf8 files
- New hook: forbid-new-submodules
- Merge conflict detection no longer crashes on binary files
- Indentation in json may be an arbitrary separator
- Editable requirements are properly sorted
- Encoding pragma fixer pragma is configurable
- Add a --no-sort-keys to json pretty formatter
- Add a --remove to fix-encoding-pragma
- Add check-byte-order-marker
- Add check-synlinks
- check-large-files-added understands git-lfs
- Support older git
- Fix regex for --django in test name checker
- Add fix-encoding-pragma hook
- requirements-txt-fixer now sorts like latest pip
- Add check-ast hook
- Add detect-aws-credentials hook
- Allow binary files to pass private key hook
- Add pretty-format-json hook
- Add --django to test name checker
- Add check-merge-conflict hook
- Remove dependency on plumbum
- Add q as a debug statement
- Don't detect markup titles as conflicts
- Teach trailing-whitespace about markdown
- Quickfix for pyflakes - flake8 version conflict
- Respect configuration when running autopep8
- Quickfix for pep8 version conflicts
- Fix trailing-whitespace on OS X
- Add check-added-large-files hook
- Add check-docstring-first hook
- Add requirements-txt-fixer hook
- Add check-case-conflict hook
- Use yaml's CLoader when available in check-yaml for more speed
- Add check-xml hook
- Fix end-of-file-fixer for windows
- Add double-quote-string-fixer hook
- Add autopep8-wrapper hook
- Add check-json hook
- Don't crash on non-parseable files for debug-statement-hook
- Initial Release