- Add
rpdb
to detected debuggers indebug-statements
- #389 PR by @danlamanna.
- Add
check-toml
hook- #400 PR by @MarSoft.
- #400 PR by @ssbarnea.
- Add
__main__
block topre_commit.file_contents_sorter
so it can be invoked usingpython -m
- #405 PR by @squeaky-pl.
- Fix
git-lfs
tests 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
pyyaml
toruamel.yaml
- This enforces (among other things) duplicate key checking in yaml.
- #351 PR by @asottile.
- Add a new
--pattern
option tono-commit-to-branch
for regex matching branch names.- #375 issue by @marcjay.
- #376 PR by @marcjay.
- Set
require_serial: true
for flake8- flake8 internally uses multiprocessing.
- #358 PR by @asottile.
- Don't run
check-executables-have-shebangs
/trailing-whitespace
hooks during thecommit-msg
stage.- #361 issue by @revolter.
- #362 PR by @revolter.
- Run
check-byte-order-marker
againsttypes: [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-hooks
now 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-wrapper
is deprecated in description- #343 PR by @TheKevJames.
autopep8-wrapper
has been moved to pre-commit/mirrors-autopep8- #92 issue by @asottile.
- #319 issue by @blaggacao.
- #321 PR by @asottile.
trailing-whitespace
defaults 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-
types
compatibility metadata removed- #323 PR @asottile.
- Correct documentation for
no-commit-to-branch
- #318 PR by @milin.
- Minimum supported version of
pre-commit
is now 0.15.0 - Use
autopep8
from pre-commit/mirrors-autopep8 - To keep mardown hard linebreaks, for
trailing-whitespace
useargs: [--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-fixer
duringcommit-msg
stage- #315 issue by @revolter.
- #317 PR by @revolter.
no-commit-to-branch
: allow--branch
to be specified multiple times- #190 PR by @moas.
- #294 PR by @asottile.
check-merge-conflict
: add--assume-in-merge
to 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
ResourcesWarning
s- #297 PR by @asottile.
- Test against python3.7
- #304 PR by @expobrain.
- Add an
--unsafe
argument tocheck-yaml
to allow custom yaml tags- #273 issue by @blackillzone.
- #274 PR by @asottile.
- Automatically remove
pkg-resources==0.0.0
inrequirements-txt-fixer
- #275 PR by @nvtkaszpir.
- Detect
breakpoint()
(python3.7+) indebug-statements
hook.- #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
AttributeError
incheck-builtin-literals
for some functions- #285 issue by @EgoWumpus.
- #286 PR by @asottile.
trailing-whitespace
entrypoint was incorrect.- f6780b9 by @asottile.
trailing-whitespace
no 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-credentials
false positive when key was empty- #258 issue by @PVSec.
- #260 PR by @PVSec.
no-commit-to-branch
no longer crashes when not on a branch- #265 issue by @hectorv.
- #266 PR by @asottile.
- Add new
check-builtin-literals
hook.- #249 #251 PR by @benwebber.
pretty-format-json
no longer depends onsimplejson
.- #254 PR by @cas--.
detect-private-key
now detects gcp keys.- #255 issue by @SaMnCo @nicain.
- #256 PR by @nicain.
- Fix output interleaving in
check-vcs-permalinks
under python3.- #245 PR by @asottile.
check-yaml
gains 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-permalinks
for ensuring permalinked github urls.- #241 PR by @asottile.
- Fix
trailing-whitespace
for non-utf8 files on macos- #242 PR by @asottile.
- Fix
requirements-txt-fixer
for 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-lfs
forcheck-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-statements
now works for non-utf-8 files.
- Add
check-executables-have-shebangs
hook.
- Add
sort-simple-yaml
hook - Fix
requirements-txt-fixer
for empty files - Add
file-contents-sorter
hook for sorting flat files check-merge-conflict
now 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.py
inname-tests-test
- Add
--no-ensure-ascii
option topretty-format-json
- Add
no-commit-to-branch
hook
- 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