Skip to content

Releases: pre-commit/pre-commit

pre-commit v1.3.0

08 Oct 22:09
Compare
Choose a tag to compare

Features

  • Add pre-commit try-repo commands
    • The new try-repo takes a repo and will run the hooks configured in that hook repository.
    • An example invocation:
      pre-commit try-repo https://github.com/pre-commit/pre-commit-hooks
    • pre-commit try-repo can also take all the same arguments as pre-commit run.
    • It can be used to try out a repository without needing to configure it.
    • It can also be used to test a hook repository while developing it.
    • #589 issue by @sverhagen.
    • #633 PR by @asottile.

pre-commit v1.2.0

04 Oct 04:20
Compare
Choose a tag to compare

Features

  • Add pygrep language
    • pygrep aims to be a more cross-platform alternative to pcre hooks.
    • #630 PR by @asottile.

Fixes

  • Use pipes.quote for executable path in hook template
    • Fixes bash syntax error when git dir contains spaces
    • #626 PR by @asottile.
  • Clean up hook template
    • Simplify code
    • Fix --config not being respected in some situations
    • #627 PR by @asottile.
  • Use file:// protocol for cloning under test
    • Fix file:// clone paths being treated as urls for golang
    • #629 PR by @asottile.
  • Add ctypes as an import for virtualenv healthchecks
    • Fixes python3.6.2 <=> python3.6.3 virtualenv invalidation
    • e70825a by @asottile.

pre-commit v1.1.2

20 Sep 12:52
Compare
Choose a tag to compare

Fixes

  • pre-commit can successfully install commit-msg hooks

pre-commit v1.1.1

18 Sep 00:08
Compare
Choose a tag to compare

Features

  • pre-commit also checks the ssl module for virtualenv health

Fixes

pre-commit v1.1.0

11 Sep 16:09
Compare
Choose a tag to compare

Features

  • pre-commit configuration gains a fail_fast option.
    • You must be using the v2 configuration format introduced in 1.0.0.
    • fail_fast defaults to false.
    • #240 issue by @Lucas-C.
    • #616 PR by @asottile.
  • pre-commit configuration gains a global exclude option.
    • This option takes a python regular expression and can be used to exclude files from all hooks.
    • You must be using the v2 configuration format introduced in 1.0.0.
    • #281 issue by @asieira.
    • #617 PR by @asottile.

pre-commit v1.0.1

07 Sep 16:58
Compare
Choose a tag to compare

Fixes

  • Fix a regression in the return code of pre-commit autoupdate
    • pre-commit migrate-config and pre-commit autoupdate return 0 when successful.
    • #614 PR by @asottile.

pre-commit v1.0.0

07 Sep 15:53
Compare
Choose a tag to compare

pre-commit will now be following semver. Thanks to all of the contributors that have helped us get this far!

Features

  • pre-commit's cache directory has moved from ~/.pre-commit to $XDG_CACHE_HOME/pre-commit (usually ~/.cache/pre-commit).

    • pre-commit clean now cleans up both the old and new directory.
    • If you were caching this directory in CI, you'll want to adjust the location.
    • #562 issue by @nagromc.
    • #602 PR by @asottile.
  • A new configuration format for .pre-commit-config.yaml is introduced which
    will enable future development.

    • The new format has a top-level map instead of a top-level list. The new format puts the hook repositories in a repos key.
    • Old list-based configurations will continue to be supported.
    • A command pre-commit migrate-config has been introduced to "upgrade" the configuration format to the new map-based configuration.
    • pre-commit autoupdate now automatically calls migrate-config.
    • In a later release, list-based configurations will issue a deprecation warning.
    • An example diff for upgrading a configuration:
    +repos:
     -   repo: https://github.com/pre-commit/pre-commit-hooks
         sha: v0.9.2
         hooks:

Updating

  • Run pre-commit migrate-config to convert .pre-commit-config.yaml to the new map format.
  • Update any references from ~/.pre-commit to ~/.cache/pre-commit.