pre-commit

A framework for managing and maintaining multi-language pre-commit hooks.

MIT License

Downloads
32.8M
Stars
12.2K
Committers
152

Bot releases are visible (Hide)

pre-commit - pre-commit v2.9.1

Published by asottile almost 4 years ago

Fixes

  • Improve error message for "hook goes missing"
    • #1709 PR by @paulhfischer.
    • #1708 issue by @theod07.
  • Add warning for /* in files / exclude regexes
    • #1707 PR by @paulhfischer.
    • #1702 issue by @asottile.
  • Fix healthy() check for language: python on windows when the base executable has non-ascii characters.
    • #1713 PR by @asottile.
    • #1711 issue by @Najiva.
pre-commit - pre-commit v2.9.0

Published by asottile almost 4 years ago

Features

Fixes

  • 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 and language_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.
pre-commit - pre-commit v2.8.2

Published by asottile almost 4 years ago

Fixes

  • Fix installation of ruby hooks with language_version: default
    • #1671 issue by @aerickson.
    • #1672 PR by @asottile.
pre-commit - pre-commit v2.8.1

Published by asottile almost 4 years ago

Fixes

  • Allow default language_version of system when the homedir is /
    • #1669 PR by @asottile.
pre-commit - pre-commit v2.8.0

Published by asottile almost 4 years ago

Features

  • 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 to language: 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.

Fixes

  • Improve healthy() check for language: 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 (and virtualenv 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.
  • Move cygwin / win32 mismatch error earlier to catch msys2 mismatches
    • #1605 issue by @danyeaw.
    • #1606 PR by @asottile.
  • Remove -p workaround for old virtualenv
    • #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 defaulting
    language_version for language: node / language: ruby
    • #1658 issue by @adithyabsk.
    • #1668 PR by @asottile.
pre-commit - pre-commit v2.7.1

Published by asottile about 4 years ago

Fixes

  • 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.
pre-commit - pre-commit v2.7.0

Published by asottile about 4 years ago

Features

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

Fixes

  • 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.
pre-commit - pre-commit v2.6.0

Published by asottile over 4 years ago

Fixes

  • Fix node hooks when NPM_CONFIG_USERCONFIG is set
    • #1521 PR by @asottile.
    • #1516 issue by @rkm.

Features

  • 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.
pre-commit - pre-commit v2.5.1

Published by asottile over 4 years ago

Fixes

  • Prevent infinite recursion of post-checkout on clone
    • #1497 PR by @asottile.
    • #1496 issue by @admorgan.
pre-commit - pre-commit v2.5.0

Published by asottile over 4 years ago

Features

  • Expose a PRE_COMMIT=1 environment variable when running hooks
    • #1467 PR by @tech-chad.
    • #1426 issue by @lorenzwalthert.

Fixes

  • Fix UnicodeDecodeError on windows when using the py launcher to detect executables with non-ascii characters in the path
    • #1474 PR by @asottile.
    • #1472 issue by DrFobos.
  • Fix DeprecationWarning on python3.9 for random.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.
pre-commit - pre-commit v2.4.0

Published by asottile over 4 years ago

Features

  • 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 to language: 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 of rev.
    • #1435 PR by @marcjay.
    • #1434 issue by @marcjay.

Fixes

  • 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.
pre-commit - pre-commit v2.3.0

Published by asottile over 4 years ago

Features

  • Calculate character width using east_asian_width
    • #1378 PR by @sophgn.
  • Use language_version: system by default for node hooks if node / npm
    are globally installed.
    • #1388 PR by @asottile.

Fixes

  • 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.
pre-commit - pre-commit v2.2.0

Published by asottile over 4 years ago

Features

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

Fixes

  • Make sure that --commit-msg-filename is passed for commit-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 when python executable goes missing.
    • #1363 PR by @asottile.
  • Fix crash when script executables are missing shebangs.
    • #1350 issue by @chriselion.
    • #1364 PR by @asottile.

Misc.

  • pre-commit now requires python>=3.6.1 (previously 3.6.0)
    • #1346 PR by @asottile.
pre-commit - pre-commit v2.1.1

Published by asottile over 4 years ago

Fixes

  • Temporarily restore python 3.6.0 support (broken in 2.0.0)
    • reported by @obestwalter.
    • 081f3028 by @asottile.
pre-commit - pre-commit v2.1.0

Published by asottile over 4 years ago

Features

  • Replace aspy.yaml with sort_keys=False.
    • #1306 PR by @asottile.
  • Add support for perl.
    • #1303 PR by @scop.

Fixes

  • Improve .git/hooks/* shebang creation when pythons are in /usr/local/bin.
    • #1312 issue by @kbsezginel.
    • #1319 PR by @asottile.

Misc.

  • Add repository badge for pre-commit.
    • pre-commit
    • #1334 PR by @ddelange.
pre-commit - pre-commit v2.0.1

Published by asottile over 4 years ago

Fixes

  • Fix ImportError in python 3.6.0 / 3.6.1 for typing.NoReturn
    • #1302 PR by @asottile.
pre-commit - pre-commit v2.0.0

Published by asottile over 4 years ago

Features

  • Expose PRE_COMMIT_REMOTE_NAME and PRE_COMMIT_REMOTE_URL as environment
    variables during pre-push hooks.
    • #1274 issue by @dmbarreiro.
    • #1288 PR by @dmbarreiro.

Fixes

  • Fix python -m pre_commit --version to mention pre-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 if core.hooksPath is
    set.
    • #1298 issue by @damienrj.
    • #1299 PR by @asottile.

Misc

  • Fix changelog date for 1.21.0.
    • #1275 PR by @flaudisio.

Updating

  • Removed pcre language, use pygrep instead.
    • #1268 PR by @asottile.
  • Removed --tags-only argument to pre-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.
pre-commit - pre-commit v1.21.0

Published by asottile almost 5 years ago

Features

  • Add conda as a new language.
    • #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.

Fixes

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

Misc.

  • Minor code documentation updates.
    • #1200 PR by @ryanrhee.
    • #1201 PR by @ryanrhee.
pre-commit - pre-commit v1.20.0

Published by asottile almost 5 years ago

Features

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

Fixes

  • Fix rare race condition with multiple concurrent first-time runs.
    • #1192 issue by @raholler.
    • #1196 PR by @asottile.
pre-commit - pre-commit v1.19.0

Published by asottile almost 5 years ago

Features

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

Fixes

  • Remove some extra newlines from error messages.
    • #1148 by @asottile.
  • When a hook is not executable it now reports not executable instead of not 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.

Updating

  • Regexes handling both backslashes and forward slashes for directory separators now only need to handle forward slashes.