Releases: pre-commit/pre-commit
Releases · pre-commit/pre-commit
pre-commit v3.0.1
pre-commit v3.0.0
Features
- Make
language: golang
bootstrapgo
if not present.- #2651 PR by @taoufik07.
- #2649 issue by @taoufik07.
language: coursier
now supportsadditional_dependencies
andrepo: local
- Upgrade
ruby-build
to20221225
.
Fixes
- Improve error message for invalid yaml for
pre-commit autoupdate
.- #2686 PR by @asottile.
- #2685 issue by @CarstenGrohmann.
repo: local
no longer provisions an emptygit
repo.
Updating
- Drop support for python<3.8
- Drop support for top-level list, use
pre-commit migrate-config
to update. - Drop support for
sha
to specify revision, usepre-commit migrate-config
to update. - Remove
pre-commit-validate-config
andpre-commit-validate-manifest
, usepre-commit validate-config
andpre-commit validate-manifest
instead. language: golang
hooks must usego.mod
to specify dependencies- #2672 PR by @taoufik07.
pre-commit v2.21.0
Features
- Require new-enough virtualenv to prevent 3.10 breakage
- Respect aliases with
SKIP
for environment install. - Allow
pre-commit run --files
against unmerged paths. - Also apply regex warnings to
repo: local
hooks.- #2524 PR by @chrisRedwine.
- #2521 issue by @asottile.
rust
is now a "first class" language -- supportinglanguage_version
and installation when not present.r
now uses more-reliable binary installation.- #2460 PR by @lorenzwalthert.
GIT_ALLOW_PROTOCOL
is now passed through for git operations.GIT_ASKPASS
is now passed through for git operations.- Remove
toml
dependency by usingcargo add
directly. - Support
dotnet
hooks which have dotted prefixes.
Fixes
- Properly adjust
--commit-msg-filename
if run from a sub directory. - Simplify
--intent-to-add
detection by usinggit diff
. - Fix
R.exe
selection on windows.- #2605 PR by @lorenzwalthert.
- #2599 issue by @SInginc.
- Skip default
nuget
source when installingdotnet
packages.
pre-commit v2.20.0
Features
- Expose
source
andobject-name
(positional args) ofprepare-commit-msg
hook asPRE_COMMIT_COMIT_MSG_SOURCE
andPRE_COMMIT_COMMIT_OBJECT_NAME
.- #2407 PR by @M-Whitaker.
- #2406 issue by @M-Whitaker.
Fixes
- Fix
language: ruby
installs when--user-install
is set in gemrc. - Adjust pty setup for solaris.
- Remove unused
--config
option fromgc
,sample-config
,validate-config
,validate-manifest
sub-commands.
pre-commit v2.19.0
Features
- Allow multiple outputs from
language: dotnet
hooks.- #2332 PR by @WallucePinkham.
- Add more information to
healthy()
failure. - Upgrade ruby-build.
- Add
pre-commit validate-config
/pre-commit validate-manifest
and deprecatepre-commit-validate-config
andpre-commit-validate-manifest
.
Fixes
Updating
pre-commit v2.18.1
pre-commit v2.18.0
Features
- Keep
GIT_HTTP_PROXY_AUTHMETHOD
in git environ.- #2272 PR by @VincentBerthier.
- #2271 issue by @VincentBerthier.
- Support both
cs
andcoursier
executables for coursier hooks. - Include more information in errors for
language_version
/additional_dependencies
for languages which do not support them. - Have autoupdate preferentially pick tags which look like versions when there are multiple equivalent tags.
- Upgrade
ruby-build
. - Add top level
default_install_hook_types
which will be installed when--hook-types
is not specified inpre-commit install
.
Fixes
- Fix typo in help message for
--from-ref
and--to-ref
. - Prioritize binary builds for R dependencies.
- #2277 PR by @lorenzwalthert.
- Fix handling of git worktrees.
- Fix handling of
$R_HOME
for R hooks.- #2301 PR by @jeff-m-sullivan.
- #2300 issue by @jeff-m-sullivan.
- Fix a rare race condition in change stashing.
- #2323 PR by @asottile.
- #2287 issue by @ian-h-chamberlain.
Updating
pre-commit v2.17.0
Features
- add warnings for regexes containing
[\\/]
. - upgrade supported ruby versions.
- allow
language: conda
to usemamba
ormicromamba
viaPRE_COMMIT_USE_MAMBA=1
orPRE_COMMIT_USE_MICROMAMBA=1
respectively.- #2204 issue by @janjagusch.
- #2207 PR by @xhochy.
- display
git --version
in error report. - add
language: lua
as a supported language.
Fixes
- temporarily add
setuptools
to the zipapp.- #2122 issue by @andreoliwa.
- a737d5f commit by @asottile.
- use
go install
instead ofgo get
for go 1.18+ support. - fix
language: r
with a local renv andRENV_PROJECT
set.- #2170 PR by @lorenzwalthert.
- forbid overriding
entry
inlanguage: meta
hooks which breaks them.- #2180 issue by @DanKaplanSES.
- #2181 PR by @asottile.
- always use
#!/bin/sh
on windows for hook script.- #2182 issue by @hushigome-visco.
- #2187 PR by @asottile.
pre-commit v2.16.0
Features
- add warning for regexes containing
[\/]
or[/\\]
.- #2053 PR by @radek-sprta.
- #2043 issue by @asottile.
- move hook template back to
bash
resolving shebang-portability issues. - add support for
fail_fast
at the individual hook level. - allow passthrough of
GIT_CONFIG_KEY_*
,GIT_CONFIG_VALUE_*
, andGIT_CONFIG_COUNT
.
Fixes
- fix pre-commit autoupdate for
core.useBuiltinFSMonitor=true
on windows. - fix temporary file stashing with for
submodule.recurse=1
. - ban broken importlib-resources versions.
- replace
exit(...)
withraise SystemExit(...)
for portability.
pre-commit v2.15.0
Features
- add support for hooks written in
dart
. - add support for
post-rewrite
hooks.