Releases: pre-commit/pre-commit
Releases · pre-commit/pre-commit
pre-commit v2.21.0
Features
- Require new-enough virtualenv to prevent 3.10 breakage
- Respect aliases with
SKIPfor environment install. - Allow
pre-commit run --filesagainst unmerged paths. - Also apply regex warnings to
repo: localhooks.- #2524 PR by @chrisRedwine.
- #2521 issue by @asottile.
rustis now a "first class" language -- supportinglanguage_versionand installation when not present.rnow uses more-reliable binary installation.- #2460 PR by @lorenzwalthert.
GIT_ALLOW_PROTOCOLis now passed through for git operations.GIT_ASKPASSis now passed through for git operations.- Remove
tomldependency by usingcargo adddirectly. - Support
dotnethooks which have dotted prefixes.
Fixes
- Properly adjust
--commit-msg-filenameif run from a sub directory. - Simplify
--intent-to-adddetection by usinggit diff. - Fix
R.exeselection on windows.- #2605 PR by @lorenzwalthert.
- #2599 issue by @SInginc.
- Skip default
nugetsource when installingdotnetpackages.
pre-commit v2.20.0
Features
- Expose
sourceandobject-name(positional args) ofprepare-commit-msghook asPRE_COMMIT_COMIT_MSG_SOURCEandPRE_COMMIT_COMMIT_OBJECT_NAME.- #2407 PR by @M-Whitaker.
- #2406 issue by @M-Whitaker.
Fixes
- Fix
language: rubyinstalls when--user-installis set in gemrc. - Adjust pty setup for solaris.
- Remove unused
--configoption fromgc,sample-config,validate-config,validate-manifestsub-commands.
pre-commit v2.19.0
Features
- Allow multiple outputs from
language: dotnethooks.- #2332 PR by @WallucePinkham.
- Add more information to
healthy()failure. - Upgrade ruby-build.
- Add
pre-commit validate-config/pre-commit validate-manifestand deprecatepre-commit-validate-configandpre-commit-validate-manifest.
Fixes
Updating
pre-commit v2.18.1
pre-commit v2.18.0
Features
- Keep
GIT_HTTP_PROXY_AUTHMETHODin git environ.- #2272 PR by @VincentBerthier.
- #2271 issue by @VincentBerthier.
- Support both
csandcoursierexecutables for coursier hooks. - Include more information in errors for
language_version/additional_dependenciesfor 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_typeswhich will be installed when--hook-typesis not specified inpre-commit install.
Fixes
- Fix typo in help message for
--from-refand--to-ref. - Prioritize binary builds for R dependencies.
- #2277 PR by @lorenzwalthert.
- Fix handling of git worktrees.
- Fix handling of
$R_HOMEfor 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: condato usemambaormicromambaviaPRE_COMMIT_USE_MAMBA=1orPRE_COMMIT_USE_MICROMAMBA=1respectively.- #2204 issue by @janjagusch.
- #2207 PR by @xhochy.
- display
git --versionin error report. - add
language: luaas a supported language.
Fixes
- temporarily add
setuptoolsto the zipapp.- #2122 issue by @andreoliwa.
- a737d5f commit by @asottile.
- use
go installinstead ofgo getfor go 1.18+ support. - fix
language: rwith a local renv andRENV_PROJECTset.- #2170 PR by @lorenzwalthert.
- forbid overriding
entryinlanguage: metahooks which breaks them.- #2180 issue by @DanKaplanSES.
- #2181 PR by @asottile.
- always use
#!/bin/shon 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
bashresolving shebang-portability issues. - add support for
fail_fastat the individual hook level. - allow passthrough of
GIT_CONFIG_KEY_*,GIT_CONFIG_VALUE_*, andGIT_CONFIG_COUNT.
Fixes
- fix pre-commit autoupdate for
core.useBuiltinFSMonitor=trueon 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-rewritehooks.
Fixes
pre-commit v2.14.1
Fixes
- fix force-push of disparate histories using git>=2.28.
- #2005 PR by @asottile.
- #2002 issue by @bogusfocused.
- fix
check-useless-excludesandcheck-hooks-applymatching non-root
.pre-commit-config.yaml.- #2026 PR by @asottile.
- pre-commit-ci/issues#84 issue by @billsioros.
pre-commit v2.14.0
Features
- During
pre-pushhooks, expose local branch asPRE_COMMIT_LOCAL_BRANCH.- #1947 PR by @FlorentClarret.
- #1410 issue by @MaicoTimmerman.
- Improve container id detection for docker-beside-docker with custom hostname.
- #1919 PR by @adarnimrod.
- #1918 issue by @adarnimrod.
Fixes
- Read legacy hooks in an encoding-agnostic way.
- #1943 PR by @asottile.
- #1942 issue by @sbienkow-ninja.
- Fix execution of docker hooks for docker-in-docker.
- #1997 PR by @asottile.
- #1978 issue by @robin-moss.

