You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After updating pre-commit to a version >=3.4.0 the typos hook starts to fail for us. Issue seems to behave different on amd64 vs aarch64, but can be reproduced stable with these simple script that just creates 30.000 files, each within its own folder:
test.sh
!#/bin/bashcd tmp
foriin {1..30000};do tdir="$(mktemp -d ./foo.XXXXXXXXX)";tfile="$(mktemp $tdir/foo.XXXXXXXXX.json)";echo foo >$tfile;echo$i;done
cat <<EOF > .pre-commit-config.yamlrepos: - repo: https://github.com/crate-ci/typos rev: v1.18.0 hooks: # Hook does not autofix on purpose. Better safe than sorry. - id: typos args: [--no-check-filenames]EOF
git init
git add -A
echo'################################ run with pre-commit==3.6.0'
pip install -q pre-commit==3.6.0
pre-commit run --all-files typos
echo'################################ run with pre-commit==3.3.3'
pip install -q pre-commit==3.3.3
pre-commit run --all-files typos
I just ran it in a docker container to keep stuff clean:
docker run --rm -ti -v $PWD/test.sh:/tmp/test.sh --entrypoint=/bin/bash python:3.11.7
(compressed) result:
################################ run with pre-commit==3.6.0
typos....................................................................Failed
- hook id: typos
- exit code: -9
-
################################ run with pre-commit==3.3.3
typos....................................................................Passed
After updating pre-commit to a version >=3.4.0 the typos hook starts to fail for us. Issue seems to behave different on amd64 vs aarch64, but can be reproduced stable with these simple script that just creates 30.000 files, each within its own folder:
test.sh
I just ran it in a docker container to keep stuff clean:
docker run --rm -ti -v $PWD/test.sh:/tmp/test.sh --entrypoint=/bin/bash python:3.11.7
(compressed) result:
There was some change towards negative signals introduced with
3.4.0
, see pre-commit/pre-commit#2970.I guess, typos ran by pre-commit can't handle a lot of files and "dies", which it may have done before, but without any visible signs.
The text was updated successfully, but these errors were encountered: