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 v3.0.0

Published by asottile over 1 year ago

Features

  • Make language: golang bootstrap go if not present.
    • #2651 PR by @taoufik07.
    • #2649 issue by @taoufik07.
  • language: coursier now supports additional_dependencies and repo: local
    • #2702 PR by @asottile.
  • Upgrade ruby-build to 20221225.
    • #2718 PR by @jalessio.

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 empty git repo.
    • #2699 PR by @asottile.

Updating

  • 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, use pre-commit migrate-config to update.
    • #2657 PR by @asottile.
  • Remove pre-commit-validate-config and pre-commit-validate-manifest, use pre-commit validate-config and pre-commit validate-manifest instead.
    • #2658 PR by @asottile.
  • language: golang hooks must use go.mod to specify dependencies
    • #2672 PR by @taoufik07.
pre-commit - pre-commit v2.21.0

Published by asottile almost 2 years ago

Features

  • 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 -- supporting language_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 using cargo add directly.
    • #2568 PR by @m-rsha.
  • Support dotnet hooks which have dotted prefixes.
    • #2641 PR by @rkm.
    • #2629 issue by @rkm.

Fixes

  • Properly adjust --commit-msg-filename if run from a sub directory.
    • #2459 PR by @asottile.
  • Simplify --intent-to-add detection by using git 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 installing dotnet packages.
    • #2642 PR by @rkm.
pre-commit - pre-commit v2.20.0

Published by asottile over 2 years ago

Features

  • Expose source and object-name (positional args) of prepare-commit-msg hook as PRE_COMMIT_COMIT_MSG_SOURCE and PRE_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.
    • #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 from gc, sample-config, validate-config, validate-manifest sub-commands.
    • #2429 PR by @asottile.
pre-commit - pre-commit v2.19.0

Published by asottile over 2 years ago

Features

  • 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 deprecate pre-commit-validate-config and pre-commit-validate-manifest.
    • #2362 PR by @asottile.

Fixes

  • Fix pre-push when pushed ref contains spaces.
    • #2345 PR by @wwade.
    • #2344 issue by @wwade.

Updating

  • Change pre-commit-validate-config / pre-commit-validate-manifest to pre-commit validate-config / pre-commit validate-manifest.
    • #2362 PR by @asottile.
pre-commit - pre-commit v2.18.1

Published by asottile over 2 years ago

Fixes

  • Fix regression for repo: local hooks running python<3.7
    • #2324 PR by @asottile.
pre-commit - pre-commit v2.18.0

Published by asottile over 2 years ago

Features

  • Keep GIT_HTTP_PROXY_AUTHMETHOD in git environ.
    • #2272 PR by @VincentBerthier.
    • #2271 issue by @VincentBerthier.
  • Support both cs and coursier 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 in pre-commit install.
    • #2322 PR by @asottile.

Fixes

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

Updating

  • 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 to main.
    • #2302 PR by @asottile.
pre-commit - pre-commit v2.17.0

Published by asottile over 2 years ago

Features

  • 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 use mamba or micromamba via PRE_COMMIT_USE_MAMBA=1 or PRE_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.

Fixes

  • temporarily add setuptools to the zipapp.
    • #2122 issue by @andreoliwa.
    • a737d5f commit by @asottile.
  • use go install instead of go get for go 1.18+ support.
    • #2161 PR by @schmir.
  • fix language: r with a local renv and RENV_PROJECT set.
    • #2170 PR by @lorenzwalthert.
  • forbid overriding entry in language: 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 - pre-commit v2.16.0

Published by asottile almost 3 years ago

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.
    • #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_*, and GIT_CONFIG_COUNT.
    • #2136 PR by @emzeat.

Fixes

  • 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(...) with raise SystemExit(...) for portability.
    • #2103 PR by @asottile.
    • #2104 PR by @asottile.
pre-commit - pre-commit v2.15.0

Published by asottile about 3 years ago

Features

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

Fixes

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

Published by asottile about 3 years ago

Fixes

  • fix force-push of disparate histories using git>=2.28.
    • #2005 PR by @asottile.
    • #2002 issue by @bogusfocused.
  • fix check-useless-excludes and check-hooks-apply matching non-root
    .pre-commit-config.yaml.
    • #2026 PR by @asottile.
    • pre-commit-ci/issues#84 issue by @billsioros.
pre-commit - pre-commit v2.14.0

Published by asottile about 3 years ago

Features

  • During pre-push hooks, expose local branch as PRE_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.
pre-commit - pre-commit v2.13.0

Published by asottile over 3 years ago

Features

  • 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 for r hooks.
    • #1878 PR by @lorenzwalthert.
  • Upgrade ruby-build and rbenv.
    • #1913 PR by @jalessio.

Fixes

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

Published by asottile over 3 years ago

Fixes

  • Fix race condition when stashing files in multiple parallel invocations
    • #1881 PR by @adamchainz.
    • #1880 issue by @adamchainz.
pre-commit - pre-commit v2.12.0

Published by asottile over 3 years ago

Features

  • Upgrade rbenv.
    • #1854 PR by @asottile.
    • #1848 issue by @sirosen.

Fixes

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

Published by asottile over 3 years ago

Fixes

  • Fix r hooks when hook repo is a package
    • #1831 PR by @lorenzwalthert.
pre-commit - pre-commit v2.11.0

Published by asottile over 3 years ago

Features

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

Fixes

  • Fix pre-commit install on subst / 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.
pre-commit - pre-commit v2.10.1

Published by asottile over 3 years ago

Fixes

  • Fix language: golang repositories containing recursive submodules
    • #1788 issue by @gaurav517.
    • #1789 PR by @paulhfischer.
pre-commit - pre-commit v2.10.0

Published by asottile over 3 years ago

Features

  • 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-level files / exclude regexes
    • #1750 PR by @paulhfischer.
    • #1702 issue by @asottile.
  • Expose PRE_COMMIT_REMOTE_BRANCH environment variable during pre-push hooks
    • #1770 PR by @surafelabebe.
  • Produce error message for language / language_version for non-installable languages
    • #1771 PR by @asottile.

Fixes

  • Fix execution in worktrees in subdirectories of bare repositories
    • #1778 PR by @asottile.
    • #1777 issue by @s0undt3ch.
pre-commit - pre-commit v2.9.3

Published by asottile almost 4 years ago

Fixes

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

Published by asottile almost 4 years ago

Fixes

  • Fix default value for types_or so symlink and directory can be matched
    • #1716 PR by @asottile.
    • #1718 issue by @CodeBleu.