Pre Commit Hooks Versions Save

Some out-of-the-box hooks for pre-commit

v2.2.0

5 years ago

Features

  • Switch from pyyaml to ruamel.yaml
    • This enforces (among other things) duplicate key checking in yaml.
    • #351 PR by @asottile.
  • Add a new --pattern option to no-commit-to-branch for regex matching branch names.
    • #375 issue by @marcjay.
    • #376 PR by @marcjay.

Fixes

  • 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 the commit-msg stage.
    • #361 issue by @revolter.
    • #362 PR by @revolter.
  • Run check-byte-order-marker against types: [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.

Misc.

  • pre-commit-hooks now is type checked with mypy.
    • #360 PR by @asottile.

v2.1.0

5 years ago

Features

  • 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.

Fixes

  • Handle CRLF / CR line endings in end-of-file-fixer
    • #327 PR by @mtkennerly.

Docs

  • Clarify and document arguments for detect-aws-credentials
    • #333 PR by @rpdelaney.
  • Clarify autopep8-wrapper is deprecated in description
    • #343 PR by @TheKevJames.

v2.0.0

5 years ago

Breaking changes

  • 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.

Docs

  • Correct documentation for no-commit-to-branch
    • #318 PR by @milin.

Updating

  • 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 use args: [--markdown-linebreak-ext=md,markdown] (the previous default value)

v1.4.0-1

5 years ago

(Note: this is a tag-only release as no code changes occurred)

Fixes

  • Don't run end-of-file-fixer during commit-msg stage
    • #315 issue by @revolter.
    • #317 PR by @revolter.

v1.4.0

5 years ago

Features

  • 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.

Fixes

  • 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.

Misc

  • Test against python3.7
    • #304 PR by @expobrain.

v1.3.0

6 years ago

Features

  • Add an --unsafe argument to check-yaml to allow custom yaml tags
    • #273 issue by @blackillzone.
    • #274 PR by @asottile.
  • Automatically remove pkg-resources==0.0.0 in requirements-txt-fixer
    • #275 PR by @nvtkaszpir.
  • Detect breakpoint() (python3.7+) in debug-statements hook.
    • #283 PR by @asottile.
  • Detect sshcom and putty hooks in detect-private-key
    • #287 PR by @vin01.

Fixes

  • Open files as UTF-8 (autopep8-wrapper, check-docstring-first, double-quote-string-fixer)
    • #279 PR by @nvtkaszpir.
  • Fix AttributeError in check-builtin-literals for some functions
    • #285 issue by @EgoWumpus.
    • #286 PR by @asottile.

v1.2.3

6 years ago

Fixes

  • trailing-whitespace entrypoint was incorrect.
    • f6780b9 by @asottile.

v1.2.2

6 years ago

Fixes

  • trailing-whitespace no longer adds a missing newline at end-of-file
    • #270 issue by @fractos.
    • #271 PR by @asottile.

v1.2.1-1

6 years ago

(Note: this is a tag-only release as no code changes occurred)

Fixes:

  • Don't pass filenames for no-commit-to-branch
    • #268 issue by @dongyuzheng.
    • #269 PR by @asottile.

v1.2.1

6 years ago

Fixes:

  • 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.