mirror of
https://github.com/OpenHands/OpenHands.git
synced 2026-10-07 17:08:34 +08:00
fix(dev): run pre-commit on staged files instead of broken sh glob (#14335)
Co-authored-by: Debug Agent <debug@example.com>
This commit is contained in:
co-authored by
Debug Agent
parent
98357473c2
commit
ff4db52f5b
@@ -6,4 +6,9 @@ npx lint-staged
|
||||
# Run backend pre-commit
|
||||
echo "Running backend pre-commit..."
|
||||
cd ..
|
||||
poetry run pre-commit run --files openhands/**/* evaluation/**/* tests/**/* --show-diff-on-failure --config ./dev_config/python/.pre-commit-config.yaml
|
||||
# Pre-commit defaults to operating on staged files; the per-hook ``types_or``
|
||||
# and ``exclude`` filters keep Python-only hooks (ruff, mypy, …) from running on
|
||||
# unrelated files. The previous ``--files openhands/**/* evaluation/**/* tests/**/*``
|
||||
# argument relied on bash globstar which husky's /bin/sh does not enable, so the
|
||||
# patterns matched only one directory level deep and silently skipped most files.
|
||||
poetry run pre-commit run --show-diff-on-failure --config ./dev_config/python/.pre-commit-config.yaml
|
||||
|
||||
Reference in New Issue
Block a user