- Fix
language: rust
default language version check whenrust-toolchain.toml
is present.- issue by @gaborbernat.
- #3201 PR by @asottile.
- Use a tty for
docker
anddocker_image
hooks when--color
is specified.- #3122 PR by @glehmann.
- Fix
fail_fast
for individual hooks stopping when previous hooks had failed.- #3167 issue by @tp832944.
- #3168 PR by @asottile.
- The per-hook behaviour of
fail_fast
was fixed. If you want the pre-3.7.0 behaviour, addfail_fast: true
to all hooks before the lastfail_fast
hook.
- Fix building golang hooks during
git commit --all
.- #3130 PR by @asottile.
- #2722 issue by @pestanko and @matthewhughes934.
- Remove
PYTHONEXECUTABLE
from environment when running.- #3110 PR by @untitaker.
- Handle staged-files-only with only a crlf diff.
- #3126 PR by @asottile.
- issue by @tyyrok.
- Check
minimum_pre_commit_version
first when parsing configs.- #3092 PR by @asottile.
- Fix deprecation warnings for
importlib.resources
.- #3043 PR by @asottile.
- Fix deprecation warnings for rmtree.
- #3079 PR by @edgarrmondragon.
- Drop support for python<3.9.
- #3042 PR by @asottile.
- #3093 PR by @asottile.
- Improve performance of
check-hooks-apply
andcheck-useless-excludes
.- #2998 PR by @mxr.
- #2935 issue by @mxr.
- Use
time.monotonic()
for more accurate hook timing.- #3024 PR by @adamchainz.
- Require npm 6.x+ for
language: node
hooks.- #2996 PR by @RoelAdriaans.
- #1983 issue by @henryiii.
- Add
language: haskell
.- #2932 by @alunduil.
- Improve cpu count detection when run under cgroups.
- #2979 PR by @jdb8.
- #2978 issue by @jdb8.
- Handle negative exit codes from hooks receiving posix signals.
- #2971 PR by @chriskuehl.
- #2970 issue by @chriskuehl.
- Work around OS packagers setting
--install-dir
/--bin-dir
in gem settings.- #2905 PR by @jaysoffian.
- #2799 issue by @lmilbaum.
- Work around
r
on windows sometimes double-un-quoting arguments.- #2885 PR by @lorenzwalthert.
- #2870 issue by @lorenzwalthert.
- Work around
git
partial clone bug forautoupdate
on windows.- #2866 PR by @asottile.
- #2865 issue by @adehad.
- Upgrade ruby-build.
- #2846 PR by @jalessio.
- Use blobless clone for faster autoupdate.
- #2859 PR by @asottile.
- Add
-j
/--jobs
argument toautoupdate
for parallel execution.- #2863 PR by @asottile.
- issue by @gaborbernat.
- Fix support for swift >= 5.8.
- #2836 PR by @edelabar.
- #2835 issue by @kgrobelny-intive.
- Fix
language_version
forlanguage: rust
without globalrustup
.- #2823 issue by @daschuer.
- #2827 PR by @asottile.
- Allow
pre-commit
,pre-push
, andpre-merge-commit
asstages
.- #2732 issue by @asottile.
- #2808 PR by @asottile.
- Add
pre-rebase
hook support.- #2582 issue by @BrutalSimplicity.
- #2725 PR by @mgaligniana.
- Remove bulky cargo cache from
language: rust
installs.- #2820 PR by @asottile.
- Fix
rust
withlanguage_version
and a non-writable hostRUSTUP_HOME
.- pre-commit-ci/issues#173 by @Swiftb0y.
- #2788 by @asottile.
- Fix
dotnet
for.sln
-based hooks for dotnet>=7.0.200.- #2763 PR by @m-rsha.
- Prevent stashing when
diff
fails to execute.- #2774 PR by @asottile.
- #2773 issue by @strubbly.
- Dependencies are no longer sorted in repository key.
- #2776 PR by @asottile.
- Deprecate
language: python_venv
. Uselanguage: python
instead.- #2746 PR by @asottile.
- #2734 issue by @asottile.
- Fix hook diff detection for files affected by
--textconv
.- #2743 PR by @adamchainz.
- #2743 issue by @adamchainz.
- Revert "Prevent local
Gemfile
from interfering with hook execution.".- #2739 issue by @Roguelazer.
- #2740 PR by @asottile.
- Prevent local
Gemfile
from interfering with hook execution.- #2727 PR by @asottile.
- Fix
language: r
,repo: local
hooks- pre-commit-ci/issues#107 by @lorenzwalthert.
- #2728 PR by @asottile.
- Ensure coursier hooks are available offline after install.
- #2723 PR by @asottile.
- Make
language: golang
bootstrapgo
if not present.- #2651 PR by @taoufik07.
- #2649 issue by @taoufik07.
language: coursier
now supportsadditional_dependencies
andrepo: local
- #2702 PR by @asottile.
- Upgrade
ruby-build
to20221225
.- #2718 PR by @jalessio.
- 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.- #2699 PR by @asottile.
- Drop support for python<3.8
- #2655 PR by @asottile.
- Drop support for top-level list, use
pre-commit migrate-config
to update.- #2656 PR by @asottile.
- Drop support for
sha
to specify revision, usepre-commit migrate-config
to update.- #2657 PR by @asottile.
- Remove
pre-commit-validate-config
andpre-commit-validate-manifest
, usepre-commit validate-config
andpre-commit validate-manifest
instead.- #2658 PR by @asottile.
language: golang
hooks must usego.mod
to specify dependencies- #2672 PR by @taoufik07.
- Require new-enough virtualenv to prevent 3.10 breakage
- #2467 PR by @asottile.
- Respect aliases with
SKIP
for environment install.- #2480 PR by @kmARC.
- #2478 issue by @kmARC.
- Allow
pre-commit run --files
against unmerged paths.- #2484 PR by @asottile.
- 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.- #2534 PR by @Holzhaus.
r
now uses more-reliable binary installation.- #2460 PR by @lorenzwalthert.
GIT_ALLOW_PROTOCOL
is now passed through for git operations.- #2555 PR by @asottile.
GIT_ASKPASS
is now passed through for git operations.- #2564 PR by @mattp-.
- Remove
toml
dependency by usingcargo add
directly.- #2568 PR by @m-rsha.
- Support
dotnet
hooks which have dotted prefixes.- #2641 PR by @rkm.
- #2629 issue by @rkm.
- Properly adjust
--commit-msg-filename
if run from a sub directory.- #2459 PR by @asottile.
- Simplify
--intent-to-add
detection by usinggit diff
.- #2580 PR by @m-rsha.
- Fix
R.exe
selection on windows.- #2605 PR by @lorenzwalthert.
- #2599 issue by @SInginc.
- Skip default
nuget
source when installingdotnet
packages.- #2642 PR by @rkm.
- 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.
- Fix
language: ruby
installs when--user-install
is set in gemrc.- #2394 PR by @narpfel.
- #2393 issue by @narpfel.
- Adjust pty setup for solaris.
- #2390 PR by @gaige.
- #2389 issue by @gaige.
- Remove unused
--config
option fromgc
,sample-config
,validate-config
,validate-manifest
sub-commands.- #2429 PR by @asottile.
- Allow multiple outputs from
language: dotnet
hooks.- #2332 PR by @WallucePinkham.
- Add more information to
healthy()
failure.- #2348 PR by @asottile.
- Upgrade ruby-build.
- #2342 PR by @jalessio.
- Add
pre-commit validate-config
/pre-commit validate-manifest
and deprecatepre-commit-validate-config
andpre-commit-validate-manifest
.- #2362 PR by @asottile.
- Fix
pre-push
when pushed ref contains spaces.- #2345 PR by @wwade.
- #2344 issue by @wwade.
- Change
pre-commit-validate-config
/pre-commit-validate-manifest
topre-commit validate-config
/pre-commit validate-manifest
.- #2362 PR by @asottile.
- Fix regression for
repo: local
hooks runningpython<3.7
- #2324 PR by @asottile.
- Keep
GIT_HTTP_PROXY_AUTHMETHOD
in git environ.- #2272 PR by @VincentBerthier.
- #2271 issue by @VincentBerthier.
- Support both
cs
andcoursier
executables for coursier hooks.- #2293 PR by @Holzhaus.
- Include more information in errors for
language_version
/additional_dependencies
for languages which do not support them.- #2315 PR by @asottile.
- Have autoupdate preferentially pick tags which look like versions when
there are multiple equivalent tags.
- #2312 PR by @mblayman.
- #2311 issue by @mblayman.
- Upgrade
ruby-build
.- #2319 PR by @jalessio.
- Add top level
default_install_hook_types
which will be installed when--hook-types
is not specified inpre-commit install
.- #2322 PR by @asottile.
- Fix typo in help message for
--from-ref
and--to-ref
.- #2266 PR by @leetrout.
- Prioritize binary builds for R dependencies.
- #2277 PR by @lorenzwalthert.
- Fix handling of git worktrees.
- #2252 PR by @daschuer.
- 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.
- Remove python3.6 support. Note that pre-commit still supports running hooks
written in older versions, but pre-commit itself requires python 3.7+.
- #2215 PR by @asottile.
- pre-commit has migrated from the
master
branch tomain
.- #2302 PR by @asottile.
- add warnings for regexes containing
[\\/]
.- #2151 issue by @sanjioh.
- #2154 PR by @kuviokelluja.
- upgrade supported ruby versions.
- #2205 PR by @jalessio.
- 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.- #2210 PR by @asottile.
- add
language: lua
as a supported language.- #2158 PR by @mblayman.
- 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.- #2161 PR by @schmir.
- 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.
- 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.- #2065 PR by @asottile.
- add support for
fail_fast
at the individual hook level.- #2097 PR by @colens3.
- #1143 issue by @potiuk.
- allow passthrough of
GIT_CONFIG_KEY_*
,GIT_CONFIG_VALUE_*
, andGIT_CONFIG_COUNT
.- #2136 PR by @emzeat.
- fix pre-commit autoupdate for
core.useBuiltinFSMonitor=true
on windows.- #2047 PR by @asottile.
- #2046 issue by @lcnittl.
- fix temporary file stashing with for
submodule.recurse=1
.- #2071 PR by @asottile.
- #2063 issue by @a666.
- ban broken importlib-resources versions.
- #2098 PR by @asottile.
- replace
exit(...)
withraise SystemExit(...)
for portability.- #2103 PR by @asottile.
- #2104 PR by @asottile.
- add support for hooks written in
dart
.- #2027 PR by @asottile.
- add support for
post-rewrite
hooks.- #2036 PR by @uSpike.
- #2035 issue by @uSpike.
- fix
check-useless-excludes
with exclude matching broken symlink.- #2029 PR by @asottile.
- #2019 issue by @pkoch.
- eliminate duplicate mutable sha warning messages for
pre-commit autoupdate
.- #2030 PR by @asottile.
- #2010 issue by @graingert.
- fix force-push of disparate histories using git>=2.28.
- #2005 PR by @asottile.
- #2002 issue by @bogusfocused.
- fix
check-useless-excludes
andcheck-hooks-apply
matching non-root.pre-commit-config.yaml
.- #2026 PR by @asottile.
- pre-commit-ci/issues#84 issue by @billsioros.
- During
pre-push
hooks, 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.
- 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.
- Setting
SKIP=...
skips installation as well.- #1875 PR by @asottile.
- pre-commit-ci/issues#53 issue by @TylerYep.
- Attempt to mount from host with docker-in-docker.
- #1888 PR by @okainov.
- #1387 issue by @okainov.
- Enable
repo: local
forr
hooks.- #1878 PR by @lorenzwalthert.
- Upgrade
ruby-build
andrbenv
.- #1913 PR by @jalessio.
- Better detect
r
packages.- #1898 PR by @lorenzwalthert.
- Avoid warnings with mismatched
renv
versions.- #1841 PR by @lorenzwalthert.
- Reproducibly produce ruby tar resources.
- #1915 PR by @asottile.
- Fix race condition when stashing files in multiple parallel invocations
- #1881 PR by @adamchainz.
- #1880 issue by @adamchainz.
- Upgrade rbenv.
- #1854 PR by @asottile.
- #1848 issue by @sirosen.
- Give command length a little more room when running batch files on windows
so underlying commands can expand further.
- #1864 PR by @asottile.
- pre-commit/mirrors-prettier#7 issue by @DeltaXWizard.
- Fix permissions of root folder in ruby archives.
- #1868 PR by @asottile.
- Fix r hooks when hook repo is a package
- #1831 PR by @lorenzwalthert.
- Improve warning for mutable ref.
- #1809 PR by @JamMarHer.
- Add support for
post-merge
hook.- #1800 PR by @psacawa.
- #1762 issue by @psacawa.
- Add
r
as a supported hook language.- #1799 PR by @lorenzwalthert.
- Fix
pre-commit install
onsubst
/ network drives on windows.- #1814 PR by @asottile.
- #1802 issue by @goroderickgo.
- Fix installation of
local
golang repositories for go 1.16.- #1818 PR by @rafikdraoui.
- #1815 issue by @rafikdraoui.
- Fix
language: golang
repositories containing recursive submodules- #1788 issue by @gaurav517.
- #1789 PR by @paulhfischer.
- Allow
ci
as a top-level map for configuration for https://pre-commit.ci- #1735 PR by @asottile.
- Add warning for mutable
rev
in configuration- #1715 PR by @paulhfischer.
- #974 issue by @asottile.
- Add warning for
/*
in top-levelfiles
/exclude
regexes- #1750 PR by @paulhfischer.
- #1702 issue by @asottile.
- Expose
PRE_COMMIT_REMOTE_BRANCH
environment variable duringpre-push
hooks- #1770 PR by @surafelabebe.
- Produce error message for
language
/language_version
for non-installable languages- #1771 PR by @asottile.
- Fix execution in worktrees in subdirectories of bare repositories
- #1778 PR by @asottile.
- #1777 issue by @s0undt3ch.
- Fix crash on cygwin mismatch check outside of a git directory
- #1721 PR by @asottile.
- #1720 issue by @chronoB.
- Fix cleanup code on docker volumes for go
- #1725 PR by @fsouza.
- Fix working directory detection on SUBST drives on windows
- #1727 PR by @mrogaski.
- #1610 issue by @jcameron73.
- Fix default value for
types_or
sosymlink
anddirectory
can be matched- #1716 PR by @asottile.
- #1718 issue by @CodeBleu.
- Improve error message for "hook goes missing"
- #1709 PR by @paulhfischer.
- #1708 issue by @theod07.
- Add warning for
/*
infiles
/exclude
regexes- #1707 PR by @paulhfischer.
- #1702 issue by @asottile.
- Fix
healthy()
check forlanguage: python
on windows when the base executable has non-ascii characters.- #1713 PR by @asottile.
- #1711 issue by @Najiva.
- Add
types_or
which allows matching multiple disparatetypes
in a hook- #1677 by @MarcoGorelli.
- #607 by @asottile.
- Add Github Sponsors / Open Collective links
- Improve cleanup for
language: dotnet
- #1678 by @rkm.
- Fix "xargs" when running windows batch files
- #1686 PR by @asottile.
- #1604 issue by @apietrzak.
- #1604 issue by @ufwtlsb.
- Fix conflict with external
rbenv
andlanguage_version: default
- #1700 PR by @asottile.
- #1699 issue by @abuxton.
- Improve performance of
git status
/git diff
commands by ignoring submodules- #1704 PR by @Vynce.
- #1701 issue by @Vynce.
- Fix installation of ruby hooks with
language_version: default
- #1671 issue by @aerickson.
- #1672 PR by @asottile.
- Allow default
language_version
ofsystem
when the homedir is/
- #1669 PR by @asottile.
- Update
rbenv
/ruby-build
- #1612 issue by @tdeo.
- #1614 PR by @asottile.
- Update
sample-config
versions- #1611 PR by @mcsitter.
- Add new language:
dotnet
- #1598 by @rkm.
- Add
--negate
option tolanguage: pygrep
hooks- #1643 PR by @MarcoGorelli.
- Add zipapp support
- #1616 PR by @asottile.
- Run pre-commit through https://pre-commit.ci
- #1662 PR by @asottile.
- Add new language:
coursier
(a jvm-based package manager)- #1633 PR by @JosephMoniz.
- Exit with distinct codes: 1 (user error), 3 (unexpected error), 130 (^C)
- #1601 PR by @int3l.
- Improve
healthy()
check forlanguage: node
+language_version: system
hooks when the system executable goes missing.- pre-commit/action#45 issue by @KOliver94.
- #1589 issue by @asottile.
- #1590 PR by @asottile.
- Fix excess whitespace in error log traceback
- #1592 PR by @asottile.
- Fix posixlike shebang invocations with shim executables of the git hook
script on windows.
- #1593 issue by @Celeborn2BeAlive.
- #1595 PR by @Celeborn2BeAlive.
- Remove hard-coded
C:\PythonXX\python.exe
path on windows as it caused confusion (andvirtualenv
can sometimes do better)- #1599 PR by @asottile.
- Fix
language: ruby
hooks when--format-executable
is present in a gemrc- issue by
Rainbow Tux
(discord). - #1603 PR by @asottile.
- issue by
- Move
cygwin
/win32
mismatch error earlier to catch msys2 mismatches- #1605 issue by @danyeaw.
- #1606 PR by @asottile.
- Remove
-p
workaround for oldvirtualenv
- #1617 PR by @asottile.
- Fix
language: node
installations to not symlink outside of the environment- pre-commit-ci/issues#2 issue by @DanielJSottile.
- #1667 PR by @asottile.
- Don't identify shim executables as valid
system
for defaultinglanguage_version
forlanguage: node
/language: ruby
- #1658 issue by @adithyabsk.
- #1668 PR by @asottile.
- Improve performance of docker hooks by removing slow
ps
call- #1572 PR by @rkm.
- #1569 issue by @asottile.
- Fix un-
healthy()
invalidation followed by install being reported as un-healthy()
.- #1576 PR by @asottile.
- #1575 issue by @jab.
- Fix rare file race condition on windows with
os.replace()
- #1577 PR by @asottile.
- Produce error message if an environment is immediately unhealthy
- #1535 PR by @asottile.
- Add --no-allow-missing-config option to init-templatedir
- #1539 PR by @singergr.
- Add warning for old list-style configuration
- #1544 PR by @asottile.
- Allow pre-commit to succeed on a readonly store.
- #1570 PR by @asottile.
- #1536 issue by @asottile.
- Fix error messaging when the store directory is readonly
- #1546 PR by @asottile.
- #1536 issue by @asottile.
- Improve
diff
performance with many hooks- #1566 PR by @jhenkens.
- #1564 issue by @jhenkens.
- Fix node hooks when
NPM_CONFIG_USERCONFIG
is set- #1521 PR by @asottile.
- #1516 issue by @rkm.
- Skip
rbenv
/ruby-download
if system ruby is available- #1509 PR by @asottile.
- Partial support for ruby on windows (if system ruby is installed)
- #1509 PR by @asottile.
- #201 issue by @asottile.
- Prevent infinite recursion of post-checkout on clone
- #1497 PR by @asottile.
- #1496 issue by @admorgan.
- Expose a
PRE_COMMIT=1
environment variable when running hooks- #1467 PR by @tech-chad.
- #1426 issue by @lorenzwalthert.
- Fix
UnicodeDecodeError
on windows when using thepy
launcher to detect executables with non-ascii characters in the path- #1474 PR by @asottile.
- #1472 issue by DrFobos.
- Fix
DeprecationWarning
on python3.9 forrandom.shuffle
method- #1480 PR by @asottile.
- #1479 issue by @isidentical.
- Normalize slashes earlier such that global
files
/exclude
use forward slashes on windows as well.- #1494 PR by @asottile.
- #1476 issue by @harrybiddle.
- Add support for
post-commit
hooks- #1415 PR by @ModischFabrications.
- #1411 issue by @ModischFabrications.
- Silence pip version warning in python installation error
- #1412 PR by @asottile.
- Improve python
healthy()
when upgrading operating systems.- #1431 PR by @asottile.
- #1427 issue by @ahonnecke.
language: python_venv
is now an alias tolanguage: python
(and will be removed in a future version).- #1431 PR by @asottile.
- Speed up python
healthy()
check.- #1431 PR by @asottile.
pre-commit autoupdate
now tries to maintain quoting style ofrev
.- #1435 PR by @marcjay.
- #1434 issue by @marcjay.
- Fix installation of go modules in
repo: local
.- #1428 PR by @scop.
- Fix committing with unstaged files and a failing
post-checkout
hook.- #1422 PR by @domodwyer.
- #1418 issue by @domodwyer.
- Fix installation of node hooks with system node installed on freebsd.
- #1443 PR by @asottile.
- #1440 issue by @jockej.
- Fix ruby hooks when
GEM_PATH
is set globally.- #1442 PR by @tdeo.
- Improve error message when
pre-commit autoupdate
/pre-commit migrate-config
are run but the pre-commit configuration is not valid yaml.- #1448 PR by @asottile.
- #1447 issue by @rpdelaney.
- Calculate character width using
east_asian_width
- #1378 PR by @sophgn.
- Use
language_version: system
by default fornode
hooks ifnode
/npm
are globally installed.- #1388 PR by @asottile.
- No longer use a hard-coded user id for docker hooks on windows
- #1371 PR by @killuazhu.
- Fix colors on windows during
git commit
- #1381 issue by @Cielquan.
- #1382 PR by @asottile.
- Produce readable error message for incorrect argument count to
hook-impl
- #1394 issue by @pip9ball.
- #1395 PR by @asottile.
- Fix installations which involve an upgrade of
pip
on windows- #1398 issue by @xiaohuazi123.
- #1399 PR by @asottile.
- Preserve line endings in
pre-commit autoupdate
- #1402 PR by @utek.
- Add support for the
post-checkout
hook- #1120 issue by @domenkozar.
- #1339 PR by @andrewhare.
- Add more readable
--from-ref
/--to-ref
aliases for--source
/--origin
- #1343 PR by @asottile.
- Make sure that
--commit-msg-filename
is passed forcommit-msg
/prepare-commit-msg
.- #1336 PR by @particledecay.
- #1341 PR by @particledecay.
- Fix crash when installation error is un-decodable bytes
- #1358 issue by @Guts.
- #1359 PR by @asottile.
- Fix python
healthy()
check whenpython
executable goes missing.- #1363 PR by @asottile.
- Fix crash when script executables are missing shebangs.
- #1350 issue by @chriselion.
- #1364 PR by @asottile.
- pre-commit now requires python>=3.6.1 (previously 3.6.0)
- #1346 PR by @asottile.
- Temporarily restore python 3.6.0 support (broken in 2.0.0)
- reported by @obestwalter.
- 081f3028 by @asottile.
- Replace
aspy.yaml
withsort_keys=False
.- #1306 PR by @asottile.
- Add support for
perl
.- #1303 PR by @scop.
- Improve
.git/hooks/*
shebang creation when pythons are in/usr/local/bin
.- #1312 issue by @kbsezginel.
- #1319 PR by @asottile.
- Fix
ImportError
in python 3.6.0 / 3.6.1 fortyping.NoReturn
.- #1302 PR by @asottile.
- Expose
PRE_COMMIT_REMOTE_NAME
andPRE_COMMIT_REMOTE_URL
as environment variables duringpre-push
hooks.- #1274 issue by @dmbarreiro.
- #1288 PR by @dmbarreiro.
- Fix
python -m pre_commit --version
to mentionpre-commit
instead of__main__.py
.- #1273 issue by @ssbarnea.
- #1276 PR by @orcutt989.
- Don't filter
GIT_SSL_NO_VERIFY
from environment when cloning.- #1293 PR by @schiermike.
- Allow
pre-commit init-templatedir
to succeed even ifcore.hooksPath
is set.- #1298 issue by @damienrj.
- #1299 PR by @asottile.
- Fix changelog date for 1.21.0.
- #1275 PR by @flaudisio.
- Removed
pcre
language, usepygrep
instead.- #1268 PR by @asottile.
- Removed
--tags-only
argument topre-commit autoupdate
(it has done nothing since 0.14.0).- #1269 by @asottile.
- Remove python2 / python3.5 support. Note that pre-commit still supports
running hooks written in python2, but pre-commit itself requires python 3.6+.
- #1260 issue by @asottile.
- #1277 PR by @asottile.
- #1281 PR by @asottile.
- #1282 PR by @asottile.
- #1287 PR by @asottile.
- #1289 PR by @asottile.
- #1292 PR by @asottile.
- Add
conda
as a newlanguage
.- #1204 issue by @xhochy.
- #1232 PR by @xhochy.
- Add top-level configuration
files
for file selection.- #1220 issue by @TheButlah.
- #1248 PR by @asottile.
- Rework
--verbose
/verbose
to be more consistent with normal runs.- #1249 PR by @asottile.
- Add support for the
pre-merge-commit
git hook.- #1210 PR by @asottile.
- this requires git 2.24+.
- Add
pre-commit autoupdate --freeze
which produces "frozen" revisions.- #1068 issue by @SkypLabs.
- #1256 PR by @asottile.
- Display hook runtime duration when run with
--verbose
.- #1144 issue by @potiuk.
- #1257 PR by @asottile.
- Produce better error message when erroneously running inside of
.git
.- #1219 issue by @Nusserdt.
- #1224 PR by @asottile.
- Note:
git
has since fixed this bug: git/git@36fd304d
- Produce better error message when hook installation fails.
- #1250 issue by @asottile.
- #1251 PR by @asottile.
- Fix cloning when
GIT_SSL_CAINFO
is necessary.- #1253 issue by @igankevich.
- #1254 PR by @igankevich.
- Fix
pre-commit try-repo
for bare, on-disk repositories.- #1258 issue by @webknjaz.
- #1259 PR by @asottile.
- Add some whitespace to
pre-commit autoupdate
to improve terminal autolink.- #1261 issue by @yhoiseth.
- #1262 PR by @yhoiseth.
- Minor code documentation updates.
- #1200 PR by @ryanrhee.
- #1201 PR by @ryanrhee.
- Allow building newer versions of
ruby
.- #1193 issue by @choffee.
- #1195 PR by @choffee.
- Bump versions reported in
pre-commit sample-config
.- #1197 PR by @asottile.
- Fix rare race condition with multiple concurrent first-time runs.
- #1192 issue by @raholler.
- #1196 PR by @asottile.
- Allow
--hook-type
to be specified multiple times.- example:
pre-commit install --hook-type pre-commit --hook-type pre-push
- #1139 issue by @MaxymVlasov.
- #1145 PR by @asottile.
- example:
- Include more version information in crash logs.
- #1142 by @marqueewinq.
- Hook colors are now passed through on platforms which support
pty
.- #1169 by @asottile.
- pre-commit now uses
importlib.metadata
directly when running in python 3.8- #1176 by @asottile.
- Normalize paths to forward slash separators on windows.
- makes it easier to match paths with
files:
regex - avoids some quoting bugs in shell-based hooks
- #1173 issue by @steigenTI.
- #1179 PR by @asottile.
- makes it easier to match paths with
- Remove some extra newlines from error messages.
- #1148 by @asottile.
- When a hook is not executable it now reports
not executable
instead ofnot found
.- #1159 issue by @nixjdm.
- #1161 PR by @WillKoehrsen.
- Fix interleaving of stdout / stderr in hooks.
- #1168 by @asottile.
- Fix python environment
healthy()
check when current working directory contains modules which shadow standard library names.- issue by @vwhsu92.
- #1185 PR by @asottile.
- Regexes handling both backslashes and forward slashes for directory separators now only need to handle forward slashes.
- Fix
node_modules
plugin installation on windows- #1123 issue by @henryykt.
- #1122 PR by @henryykt.
- Make default python lookup more deterministic to avoid redundant installs
- #1117 PR by @scop.
- Fix installation of
rust
hooks with newcargo
- #1112 issue by @zimbatm.
- #1113 PR by @zimbatm.
- Use the current running executable if it matches the requested
language_version
- #1062 PR by @asottile.
- Print the stage when a hook is not found
- #1078 issue by @madkinsz.
- #1079 PR by @madkinsz.
pre-commit autoupdate
now supports non-master
default branches- #1089 PR by @asottile.
- Add
pre-commit init-templatedir
which makes it easier to automatically enablepre-commit
in cloned repositories.- #1084 issue by @ssbarnea.
- #1090 PR by @asottile.
- #1107 PR by @asottile.
- pre-commit's color can be controlled using
PRE_COMMIT_COLOR={auto,always,never}
- #1073 issue by @saper.
- #1092 PR by @geieredgar.
- #1098 PR by @geieredgar.
- pre-commit's color can now be disabled using
TERM=dumb
- #1073 issue by @saper.
- #1103 PR by @asottile.
- pre-commit now supports
docker
based hooks on windows- #1072 by @cz-fish.
- #1093 PR by @geieredgar.
- Fix shallow clone
- #1077 PR by @asottile.
- Fix autoupdate version flip flop when using shallow cloning
- #1076 issue by @mxr.
- #1088 PR by @asottile.
- Fix autoupdate when the current revision is invalid
- #1088 PR by @asottile.
- Replace development instructions with
tox --devenv ...
- #1032 issue by @yoavcaspi.
- #1067 PR by @asottile.
- Produce better output on
^C
- #1030 PR by @asottile.
- Warn on unknown keys at the top level and repo level
- #1028 PR by @yoavcaspi.
- #1048 PR by @asottile.
- Fix handling of
^C
in wrapper script in python 3.x- #1027 PR by @asottile.
- Fix
rmtree
for non-writable directories- #1042 issue by @detailyang.
- #1043 PR by @asottile.
- Pass
--color
option togit diff
in--show-diff-on-failure
- #1007 issue by @chadrik.
- #1051 PR by @mandarvaze.
- Fix test when
pre-commit
is installed globally- #1032 issue by @yoavcaspi.
- #1045 PR by @asottile.
- Don't
UnicodeDecodeError
on unexpected non-UTF8 output in python health check on windows.- #1021 issue by @nicoddemus.
- #1022 PR by @asottile.
- Add support for
prepare-commit-msg
hook- #1004 PR by @marcjay.
- Fix repeated legacy
pre-commit install
on windows- #1010 issue by @AbhimanyuHK.
- #1011 PR by @asottile.
- Whitespace fixup
- #1014 PR by @mxr.
- Fix CI check for working pcre support
- #1015 PR by @Myrheimb.
- Switch CI from travis / appveyor to azure pipelines
- #1012 PR by @asottile.
- Fix cloning non-branch tag while in the fallback slow-clone strategy.
- #997 issue by @jpinner.
- #998 PR by @asottile.
- Fix command length calculation on posix when
SC_ARG_MAX
is not defined.- #691 issue by @ushuz.
- #987 PR by @asottile.
- No longer require being in a
git
repo to runpre-commit
clean
/gc
/sample-config
.- #959 PR by @asottile.
- Improve command line length limit detection.
- #691 issue by @antonbabenko.
- #966 PR by @asottile.
- Use shallow cloning when possible.
- #958 PR by @DanielChabrowski.
- Add
minimum_pre_commit_version
top level key to require a new-enough version ofpre-commit
.- #977 PR by @asottile.
- Add helpful CI-friendly message when running
pre-commit run --all-files --show-diff-on-failure
.- #982 PR by @bnorquist.
- Fix
try-repo
for staged untracked changes.- #973 PR by @DanielChabrowski.
- Fix rpm build by explicitly using
#!/usr/bin/env python3
in hook template.- #985 issue by @tim77.
- #986 PR by @tim77.
- Guard against infinite recursion when executing legacy hook script.
- #981 PR by @tristan0x.
- Add test for
git.no_git_env()
- #972 PR by @javabrett.
- Don't filter
GIT_SSH_COMMAND
env variable fromgit
commands- #947 issue by @firba1.
- #948 PR by @firba1.
- Install npm packages as if they were installed from
git
- #943 issue by @ssbarnea.
- #949 PR by @asottile.
- Don't filter
GIT_EXEC_PREFIX
env variable fromgit
commands- #664 issue by @revolter.
- #944 PR by @minrk.
- Improve performance of filename classification by 45% - 55%.
- #921 PR by @asottile.
- Fix installing
go
hooks whileGOBIN
environment variable is set.- #924 PR by @ashanbrown.
- Fix crash while running
pre-commit migrate-config
/pre-commit autoupdate
with an empty configuration file.- #929 issue by @ardakuyumcu.
- #933 PR by @jessebona.
- Require a newer virtualenv to fix metadata-based setup.cfg installs.
- #936 PR by @asottile.
- Make the hook shebang detection more timid (1.14.0 regression)
- Homebrew/homebrew-core#35825.
- #915 PR by @asottile.
- Fix python executable lookup on windows when using conda
- #913 issue by @dawelter2.
- #914 PR by @asottile.
- Add an
alias
configuration value to allow repeated hooks to be differentiated- #882 issue by @s0undt3ch.
- #886 PR by @s0undt3ch.
- Add
identity
meta hook which just prints filenames- #865 issue by @asottile.
- #898 PR by @asottile.
- Factor out
cached-property
and improve startup performance by ~10%- #899 PR by @asottile.
- Add a warning on unexpected keys in configuration
- #899 PR by @asottile.
- Teach
pre-commit try-repo
to clone uncommitted changes on disk.- #589 issue by @sverhagen.
- #703 issue by @asottile.
- #904 PR by @asottile.
- Implement
pre-commit gc
which will clean up no-longer-referenced cache repos.- #283 issue by @jtwang.
- #906 PR by @asottile.
- Add top level config
default_language_version
to streamline overriding thelanguage_version
configuration in many places- #647 issue by @asottile.
- #908 PR by @asottile.
- Add top level config
default_stages
to streamline overriding thestages
configuration in many places- #768 issue by @mattlqx.
- #909 PR by @asottile.
- More intelligently pick hook shebang (
#!/usr/bin/env python3
)- #878 issue by @fristedt.
- #893 PR by @asottile.
- Several fixes related to
--files
/--config
:pre-commit run --files x
outside of a git dir no longer stacktracespre-commit run --config ./relative
while in a sub directory of the git repo is now able to find the configurationpre-commit run --files ...
no longer runs a subprocess per file (performance)- #895 PR by @asottile.
pre-commit try-repo ./relative
while in a sub directory of the git repo is now able to clone properly- #903 PR by @asottile.
- Ensure
meta
repos cannot have a language other thansystem
- #905 issue by @asottile.
- #907 PR by @asottile.
- Fix committing with unstaged files that were
git add --intent-to-add
added- #881 issue by @henniss.
- #912 PR by @asottile.
- Use
--no-gpg-sign
when running tests- #894 PR by @s0undt3ch.
- Run hooks in parallel
- individual hooks may opt out of parallel execution with
require_serial: true
- #510 issue by @chriskuehl.
- #851 PR by @chriskuehl.
- individual hooks may opt out of parallel execution with
- Improve platform-specific
xargs
command length detection- #691 issue by @antonbabenko.
- #839 PR by @georgeyk.
- Fix
pre-commit autoupdate
when updating to a latest tag missing a.pre-commit-hooks.yaml
- #856 issue by @asottile.
- #857 PR by @runz0rd.
- Upgrade the
pre-commit-hooks
version inpre-commit sample-config
- #870 by @asottile.
- Improve balancing of multiprocessing by deterministic shuffling of args
- #861 issue by @Dunedan.
- #874 PR by @chriskuehl.
ruby
hooks work with latestgem
by removing--no-ri
/--no-rdoc
and instead using--no-document
.- #889 PR by @asottile.
- Use
--no-gpg-sign
when running tests- #885 PR by @s0undt3ch.
- If a hook requires serial execution, set
require_serial: true
to avoid the new parallel execution. ruby
hooks now requiregem>=2.0.0
. If your platform doesn't support this by default, select a newer version usinglanguage_version
.
- Install multi-hook repositories only once (performance)
- issue by @chriskuehl.
- #852 PR by @asottile.
- Improve performance by factoring out pkg_resources (performance)
- #840 issue by @RonnyPfannschmidt.
- #846 PR by @asottile.
check-useless-exclude
now considerstypes
- #704 issue by @asottile.
- #837 PR by @georgeyk.
pre-push
hook was not identifying all commits on push to new branch- #843 issue by @prem-nuro.
- #844 PR by @asottile.
- Fix
.git
dir detection ingit<2.5
(regression introduced in 1.10.5)- #831 issue by @mmacpherson.
- #832 PR by @asottile.
- Add new
fail
language which always fails- light-weight way to forbid files by name.
- #812 #821 PRs by @asottile.
- Fix
ResourceWarning
s for unclosed files- #811 PR by @BoboTiG.
- Don't write ANSI colors on windows when color enabling fails
- #819 PR by @jeffreyrack.
- Work around
PATH
issue withbrew
python
onmacos
- Homebrew/homebrew-core#30445 issue by @asottile.
- #805 PR by @asottile.
- Support
pre-commit install
inside a worktree- #808 issue by @s0undt3ch.
- #809 PR by @asottile.
- Replace
yaml.load
with safe alternativeyaml.load
can lead to arbitrary code execution, though not where it was used- issue by @tonybaloney.
- #779 PR by @asottile.
- Improve not found error with script paths (
./exe
)- #782 issue by @ssbarnea.
- #785 PR by @asottile.
- Fix minor buffering issue during
--show-diff-on-failure
- #796 PR by @asottile.
- Default
language_version: python3
forpython_venv
when running in python2- #794 issue by @ssbarnea.
- #797 PR by @asottile.
pre-commit run X
only runX
and not hooks withstages: [...]
- #772 issue by @asottile.
- #803 PR by @mblayman.
- Improve travis-ci build times by caching rust / swift artifacts
- #781 PR by @expobrain.
- Test against python3.7
- #789 PR by @expobrain.
- Fix
pre-push
during a force push without a fetch- #777 issue by @domenkozar.
- #778 PR by @asottile.
- pre-commit now invokes hooks with a consistent ordering of filenames
- issue by @mxr.
- #767 PR by @asottile.
python_venv
language would leak dependencies when pre-commit was installed in a-mvirtualenv
virtualenv- #755 #756 issue and PR by @asottile.
- Add support for hooks written in
rust
- #751 PR by @chriskuehl.
- Add new
python_venv
language which uses thevenv
module instead ofvirtualenv
- #631 issue by @dongyuzheng.
- #739 PR by @ojii.
- Include
LICENSE
in distribution- #745 issue by @nicoddemus.
- #746 PR by @nicoddemus.
- Normalize relative paths for
pre-commit try-repo
- #750 PR by @asottile.
- Fix cloning relative paths (regression in 1.7.0)
- #728 issue by @jdswensen.
- #729 PR by @asottile.
- Fix integration with go 1.10 and
pkg
directory- #725 PR by @asottile
- Restore support for
git<1.8.5
(inadvertently removed in 1.7.0)- #723 issue by @JohnLyman.
- #724 PR by @asottile.
- Add a
manual
stage for cli-only interaction- #719 issue by @hectorv.
- #720 PR by @asottile.
- Add a
--multiline
option topygrep
hooks- #716 PR by @tdeo.
- pre-commit config validation was split to a separate
cfgv
library- #700 PR by @asottile.
- Allow
--repo
to be specified multiple times to autoupdate- #658 issue by @KevinHock.
- #713 PR by @asottile.
- Enable
rev
as a preferred alternative tosha
in.pre-commit-config.yaml
- #106 issue by @asottile.
- #715 PR by @asottile.
- Use
--clean-src
option when invokingnodeenv
to save ~70MB per node env- #717 PR by @asottile.
- Refuse to install with
core.hooksPath
set- pre-commit/pre-commit-hooks#250 issue by @revolter.
- #663 issue by @asottile.
- #718 PR by @asottile.
- hooks with
additional_dependencies
now get isolated environments- #590 issue by @coldnight.
- #711 PR by @asottile.
- test against swift 4.x
- #709 by @theresama.
- Run
pre-commit migrate-config
to convertsha
torev
in the.pre-commit-config.yaml
file.
- Hooks now may have a
verbose
option to produce output even without failure- #689 issue by @bagerard.
- #695 PR by @bagerard.
- Installed hook no longer requires
bash
- #699 PR by @asottile.
- legacy pre-push / commit-msg hooks are now invoked as if
git
called them- #693 issue by @samskiter.
- #694 PR by @asottile.
- #699 PR by @asottile.
- proper detection for root commit during pre-push
- #503 PR by @philipgian.
- #692 PR by @samskiter.
- pre-commit now supports node hooks on windows.
- for now, requires python3 due to https://bugs.python.org/issue32539
- huge thanks to @wenzowski for the tip!
- #200 issue by @asottile.
- #685 PR by @asottile.
- internal reorganization of
PrefixedCommandRunner
->Prefix
- #684 PR by @asottile.
- https-ify links.
- pre-commit.com is now served over https.
- #688 PR by @asottile.
- Fix
local
golang repositories withadditional_dependencies
.- #679 #680 issue and PR by @asottile.
- Replace some string literals with constants
- #678 PR by @revolter.
- Invoke
git diff
without a pager during--show-diff-on-failure
.- #676 PR by @asottile.
pre-commit
on windows can find pythons at non-hardcoded paths.- #674 PR by @asottile.
pre-commit
no longer clearsGIT_SSH
environment variable when cloning.- #671 PR by @rp-tanium.
pre-commit autoupdate --repo ...
no longer deletes other repos.- #660 issue by @KevinHock.
- #661 PR by @KevinHock.
- Lazily install repositories.
- When running
pre-commit run <hookid>
, pre-commit will only install the necessary repositories. - #637 issue by @webknjaz.
- #639 PR by @asottile.
- When running
- Version defaulting now applies to local hooks as well.
- This extends #556 to apply to local hooks.
- #646 PR by @asottile.
- Add new
repo: meta
hooks.meta
hooks expose some linters of the pre-commit configuration itself.id: check-useless-excludes
: ensures thatexclude
directives actually apply to any file in the repository.id: check-hooks-apply
: ensures that the configured hooks apply to at least one file in the repository.- pre-commit/pre-commit-hooks#63 issue by @asottile.
- #405 issue by @asottile.
- #643 PR by @hackedd.
- #653 PR by @asottile.
- #654 PR by @asottile.
- Allow a specific repository to be autoupdated instead of all repositories.
pre-commit autoupdate --repo ...
- #656 issue by @KevinHock.
- #657 PR by @KevinHock.
- Apply selinux labelling option to docker volumes
- #642 PR by @jimmidyson.
- 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 aspre-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.
- The new
- Add
pygrep
languagepygrep
aims to be a more cross-platform alternative topcre
hooks.- #630 PR by @asottile.
- 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.
- Fix
- Add
ctypes
as an import for virtualenv healthchecks- Fixes python3.6.2 <=> python3.6.3 virtualenv invalidation
- e70825ab by @asottile.
- pre-commit can successfully install commit-msg hooks
- Due to an oversight, the commit-msg-tmpl was missing from the packaging
- #623 issue by @sobolevn.
- #624 PR by @asottile.
- pre-commit also checks the
ssl
module for virtualenv health- Suggestion by @merwok.
- #619 PR by @asottile.
- pre-commit no longer crashes with unstaged files when run for the first time
- #620 #621 issue by @Lucas-C.
- #622 PR by @asottile.
- pre-commit configuration gains a
fail_fast
option.- You must be using the v2 configuration format introduced in 1.0.0.
fail_fast
defaults tofalse
.- #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.
- Fix a regression in the return code of
pre-commit autoupdate
pre-commit migrate-config
andpre-commit autoupdate
return 0 when successful.- #614 PR by @asottile.
pre-commit will now be following semver. Thanks to all of the contributors that have helped us get this far!
-
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 callsmigrate-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:
- #414 issue by @asottile.
- #610 PR by @asottile.
- The new format has a top-level map instead of a top-level list. The
new format puts the hook repositories in a
- 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
.
- Allow --config to affect
pre-commit install
- Tweak not found error message during
pre-push
/commit-msg
- Improve node support when running under cygwin.
- Fix
--all-files
, detection of staged files, detection of manually edited files during merge conflict, and detection of files to push for non-ascii filenames.
- Only mention locking when waiting for a lock.
- Fix
IOError
during locking in timeout situation on windows under python 2.
- Add a new
docker_image
language type.docker_image
is intended to be a lightweight hook type similar tosystem
/script
which allows one to use an existing docker image that provides a hook.docker_image
hooks can also be used as repositorylocal
hooks.
- Fix typos in help
- Allow
commit-msg
hook to be uninstalled - Upgrade the
sample-config
- Remove undocumented
--no-stash
and--allow-unstaged-config
- Remove
validate_config
hook pre-commit hook. - Fix installation race condition when multiple
pre-commit
processes would attempt to install the same repository.
- autoupdate attempts to maintain config formatting.
- Initialize submodules in hook repositories.
- Improve node support when running under cygwin.
- Remove backward compatibility with repositories providing metadata via
hooks.yaml
. New repositories should provide.pre-commit-hooks.yaml
. Runpre-commit autoupdate
to upgrade to the latest repositories. - Improve golang support when running under cygwin.
- Fix crash with unstaged trailing whitespace additions while git was
configured with
apply.whitespace = error
. - Fix crash with unstaged end-of-file crlf additions and the file's lines
ended with crlf while git was configured with
core-autocrlf = true
.
- Add support for the
commit-msg
git hook
- Recover from invalid python virtualenvs
- Work around a windows-specific virtualenv bug pypa/virtualenv#1062 This failure mode was introduced in 0.15.1
- Use a more intelligent default language version for python
- Add
types
andexclude_types
for filtering files. These options take an array of "tags" identified for each file. The tags are sourced from identify. One can list the tags for a file by runningidentify-cli filename
. files
is now optional (defaulting to''
)always_run
+ missingfiles
also defaults tofiles: ''
(previously it defaulted to'^$'
(this reverses e150921c).
- Expose
--origin
and--source
asPRE_COMMIT_ORIGIN
andPRE_COMMIT_SOURCE
environment variables when running aspre-push
.
- Use
--no-ext-diff
when runninggit diff
- Don't crash when
always_run
isTrue
andfiles
is not provided. - Set
VIRTUALENV_NO_DOWNLOAD
when making python virtualenvs.
- Add a
pre-commit sample-config
command - Enable ansi color escapes on modern windows
autoupdate
now defaults to--tags-only
, use--bleeding-edge
for the old behavior- Add support for
log_file
in hook configuration to tee hook output to a file for CI consumption, etc. - Fix crash with unicode commit messages during merges in python 2.
- Add a
pass_filenames
option to allow disabling automatic filename positional arguments to hooks.
- Fix regression in 0.13.5: allow
always_run
andfiles
together despite doing nothing.
- 0.13.4 contained incorrect files
- Add
--show-diff-on-failure
option topre-commit run
- Replace
jsonschema
with better error messages
- Add
--allow-missing-config
to install: allowsgit commit
without a configuration.
- Version the local hooks repo
- Allow
minimum_pre_commit_version
for local hooks
- Fix placeholder gem for ruby local hooks
- Autoupdate now works even when the current state is broken.
- Improve pre-push fileset on new branches
- Allow "language local" hooks, hooks which install dependencies using
additional_dependencies
andlanguage
are now allowed inrepo: local
.
- Fix docker hooks on older (<1.12) docker
- golang hooks now support additional_dependencies
- Added a --tags-only option to pre-commit autoupdate
- The new default file for implementing hooks in remote repositories is now .pre-commit-hooks.yaml to encourage repositories to add the metadata. As such, the previous hooks.yaml is now deprecated and generates a warning.
- Fix bug with local configuration interfering with ruby hooks
- Added support for hooks written in golang.
- SwiftPM support.
- shlex entry of docker based hooks.
- Make shlex behaviour of entry more consistent.
- Add an
install-hooks
command similar toinstall --install-hooks
but without theinstall
side-effects. - Adds support for docker based hooks.
- Warn when cygwin / python mismatch
- Add --config for customizing configuration during run
- Update rbenv + plugins to latest versions
- pcre hooks now fail when grep / ggrep are not present
- Fix python hook installation when a strange setup.cfg exists
- Remove some python2.6 compatibility
- UI is no longer sized to terminal width, instead 80 characters or longest necessary width.
- Fix inability to create python hook environments when using venv / pyvenv on osx
- Remove some python2.6 compatibility
- Fix staged-files-only with external diff tools
- Only consider forward diff in changed files
- Don't run on staged deleted files that still exist
- Autoupdate to tags when available
- Stop supporting python2.6
- Fix crash with staged files containing unstaged lines which have non-utf8 bytes and trailing whitespace
- Fix a crash introduced in 0.8.0 when an executable was not found
- Fix regression introduced in 0.8.0 when already using rbenv with no configured ruby hook version
- Fix --files when running in a subdir
- Improve --help a bit
- Switch to pyterminalsize for determining terminal size
- Work under latest virtualenv
- No longer create empty directories on windows with latest virtualenv
- Consider dead symlinks as files when committing
- Produce error message instead of crashing on non-utf8 installation failure
- Fix regression introduced in 0.7.1 breaking
git commit -a
- Add
always_run
setting for hooks to run even without file changes.
- Support running pre-commit inside submodules
- Store state about additional_dependencies for rollforward/rollback compatibility
- Build as a universal wheel
- Allow '.format('-like strings in arguments
- Add an option to require a minimum pre-commit version
- Print a useful message when a hook id is not present
- Fix printing of non-ascii with unexpected errors
- Print a message when a hook modifies files but produces no output
- Add
additional_dependencies
to hook configuration. - Fix pre-commit cloning under git 2.6
- Small improvements for windows
- Allow args for pcre hooks
- Fix regression introduced in 0.6.3 regarding hooks which make non-utf8 diffs
- Remove
expected_return_code
- Fail a hook if it makes modifications to the working directory
- Use --no-ri --no-rdoc instead of --no-document for gem to fix old gem
- Fix pre-push when pushing something that's already up to date
- Filter hooks by stage (commit, push).
- Change permissions a few files
- Rename the validate entrypoints
- Add --version to some entrypoints
- Add --no-document to gem installations
- Use expanduser when finding the python binary
- Suppress complaint about $TERM when no tty is attached
- Support pcre hooks on osx through ggrep
- Allow hooks to produce outputs with arbitrary bytes
- Fix pre-commit install when .git/hooks/pre-commit is a dead symlink
- Allow an unstaged config when using --files or --all-files
- Fix autoupdate with "local" hooks - don't purge local hooks.
- Fix autoupdate with "local" hooks
- Fix bug with unknown non-ascii hook-id
- Avoid crash when .git/hooks is not present in some git clients
- Add a new "local" hook type for running hooks without remote configuration.
- Complain loudly when .pre-commit-config.yaml is unstaged.
- Better support for multiple language versions when running hooks.
- Allow exclude to be defaulted in repository configuration.
- Use sys.executable when executing virtualenv
- Use reset instead of checkout when checkout out hook repo
- Limit length of xargs arguments to workaround windows xargs bug
- Don't rename across devices when creating sqlite database
- Make ^C^C During installation not cause all subsequent runs to fail
- Print while installing (instead of while cloning)
- Use sqlite to manage repositories (instead of symlinks)
- MVP Windows support
args
in venv'd languages are now property quoted.
- Support running during
pre-push
. See https://pre-commit.com/#advanced 'pre-commit during push'.
- Allow hook providers to default
args
inhooks.yaml
- Improve message for
CalledProcessError
- Fix for
staged_files_only
with color.diff = always #176.
- Fix error clobbering #174.
- Remove dependency on
plumbum
. - Allow pre-commit to be run from anywhere in a repository #175.
- Add
--files
option topre-commit run
- Fix terminal width detection (broken in 0.2.10)
- Bump version of nodeenv to fix bug with ~/.npmrc
- Choose
python
more intelligently when running.
- Fix bug where sys.stdout.write must take
bytes
in python 2.6
- Allow a client to have duplicates of hooks.
- Use --prebuilt instead of system for node.
- Improve some fatal error messages
- Produce output when running pre-commit install --install-hooks
- Print hookid on failure
- Use sys.executable for running nodeenv
- Allow running as
python -m pre_commit
- Default columns to 80 (for non-terminal execution).
- Support --install-hooks as an argument to
pre-commit install
- Install hooks before attempting to run anything
- Use
python -m nodeenv
instead ofnodeenv
- Freeze ruby building infrastructure
- Fix bug that assumed diffs were utf-8
- Fix filenames with spaces
- Use either
pre-commit
orpython -m pre_commit.main
depending on which is available - Don't use readlink -f
- Fix for merge-conflict during cherry-picking.
- Add -V / --version
- Add migration install mode / install -f / --overwrite
- Add
pcre
"language" for perl compatible regexes - Reorganize packages.
- Fixed bug with autoupdate setting defaults on un-updated repos.
- Initial Release