A framework for managing and maintaining multi-language pre-commit hooks.
MIT License
Bot releases are visible (Hide)
Published by asottile almost 4 years ago
/*
in files
/ exclude
regexes
healthy()
check for language: python
on windows when the base executable has non-ascii characters.
Published by asottile almost 4 years ago
types_or
which allows matching multiple disparate types
in a hook
language: dotnet
rbenv
and language_version: default
git status
/ git diff
commands by ignoring submodules
Published by asottile almost 4 years ago
language_version: default
Published by asottile almost 4 years ago
language_version
of system
when the homedir is /
Published by asottile almost 4 years ago
rbenv
/ ruby-build
sample-config
versions
dotnet
--negate
option to language: pygrep
hooks
coursier
(a jvm-based package manager)
healthy()
check for language: node
+ language_version: system
hooks when the system executable goes missing.
C:\PythonXX\python.exe
path on windows as it caused confusion (and virtualenv
can sometimes do better)
language: ruby
hooks when --format-executable
is present in a gemrc
Rainbow Tux
(discord).cygwin
/ win32
mismatch error earlier to catch msys2 mismatches
-p
workaround for old virtualenv
language: node
installations to not symlink outside of the environment
system
for defaultinglanguage_version
for language: node
/ language: ruby
Published by asottile about 4 years ago
ps
call
healthy()
invalidation followed by install being reported as un-healthy()
.
os.replace()
Published by asottile about 4 years ago
diff
performance with many hooks
Published by asottile over 4 years ago
NPM_CONFIG_USERCONFIG
is set
rbenv
/ ruby-download
if system ruby is available
Published by asottile over 4 years ago
Published by asottile over 4 years ago
PRE_COMMIT=1
environment variable when running hooks
UnicodeDecodeError
on windows when using the py
launcher to detect executables with non-ascii characters in the path
DeprecationWarning
on python3.9 for random.shuffle
method
files
/ exclude
use forward slashes on windows as well.
Published by asottile over 4 years ago
post-commit
hooks
healthy()
when upgrading operating systems.
language: python_venv
is now an alias to language: python
(and will be removed in a future version).
healthy()
check.
pre-commit autoupdate
now tries to maintain quoting style of rev
.
repo: local
.
post-checkout
hook.
GEM_PATH
is set globally.
pre-commit autoupdate
/ pre-commit migrate-config
are run but the pre-commit configuration is not valid yaml.
Published by asottile over 4 years ago
east_asian_width
language_version: system
by default for node
hooks if node
/ npm
git commit
hook-impl
pip
on windows
pre-commit autoupdate
Published by asottile over 4 years ago
post-checkout
hook
--from-ref
/ --to-ref
aliases for --source
/ --origin
--commit-msg-filename
is passed for commit-msg
/ prepare-commit-msg
.
healthy()
check when python
executable goes missing.
Published by asottile over 4 years ago
Published by asottile over 4 years ago
aspy.yaml
with sort_keys=False
.
perl
.
.git/hooks/*
shebang creation when pythons are in /usr/local/bin
.
Published by asottile over 4 years ago
ImportError
in python 3.6.0 / 3.6.1 for typing.NoReturn
Published by asottile over 4 years ago
PRE_COMMIT_REMOTE_NAME
and PRE_COMMIT_REMOTE_URL
as environmentpre-push
hooks.
python -m pre_commit --version
to mention pre-commit
instead of__main__.py
.
GIT_SSL_NO_VERIFY
from environment when cloning.
pre-commit init-templatedir
to succeed even if core.hooksPath
ispcre
language, use pygrep
instead.
--tags-only
argument to pre-commit autoupdate
(it has donePublished by asottile almost 5 years ago
conda
as a new language
.
files
for file selection.
--verbose
/ verbose
to be more consistent with normal runs.
pre-merge-commit
git hook.
pre-commit autoupdate --freeze
which produces "frozen" revisions.
--verbose
.
.git
.
git
has since fixed this bug: git/git@36fd304dGIT_SSL_CAINFO
is necessary.
pre-commit try-repo
for bare, on-disk repositories.
pre-commit autoupdate
to improve terminal autolink.
Published by asottile almost 5 years ago
ruby
.
pre-commit sample-config
.
Published by asottile almost 5 years ago
--hook-type
to be specified multiple times.
pre-commit install --hook-type pre-commit --hook-type pre-push
pty
.
importlib.metadata
directly when running in python 3.8
files:
regexnot executable
instead of not found
.
healthy()
check when current working directory contains modules which shadow standard library names.