2025-11-24 13:14:08 +08:00
default_install_hook_types :
- pre-commit
- commit-msg
2025-10-24 12:16:48 +08:00
repos :
- repo : https://github.com/pre-commit/pre-commit-hooks
2025-12-26 14:11:35 +08:00
rev : v6.0.0
2025-10-24 12:16:48 +08:00
hooks :
# list of supported hooks: https://pre-commit.com/hooks.html
- id : check-yaml
args : [ "--unsafe" ]
2026-03-09 17:02:23 +01:00
exclude : "examples/online_serving/chart-helm/templates/"
2025-10-24 12:16:48 +08:00
- id : debug-statements
- id : end-of-file-fixer
- id : mixed-line-ending
args : [ "--fix=lf" ]
- id : trailing-whitespace
args : [ "--markdown-linebreak-ext=md" ]
2025-11-17 18:13:05 +08:00
- repo : https://github.com/astral-sh/ruff-pre-commit
2025-12-26 14:11:35 +08:00
rev : v0.14.10
2025-10-24 12:16:48 +08:00
hooks :
2025-11-18 20:54:26 +08:00
- id : ruff-check
args : [ --output-format, github, --fix]
- id : ruff-format
2025-11-17 18:13:05 +08:00
- repo : https://github.com/crate-ci/typos
2025-12-26 14:11:35 +08:00
rev : typos-dict-v0.13.13
2025-11-17 18:13:05 +08:00
hooks :
- id : typos
# only for staged files
- repo : https://github.com/rhysd/actionlint
2026-01-27 10:22:40 +08:00
# v1.7.8+ sets `go 1.24.0` in go.mod, which older Go toolchains (and most
# current CI images) cannot parse. Pin to v1.7.7 until actionlint fixes the
# go.mod directive.
rev : v1.7.7
2025-11-17 18:13:05 +08:00
hooks :
- id : actionlint
files : ^\.github/workflows/.*\.ya?ml$
2025-11-24 13:14:08 +08:00
- repo : local
hooks :
- id : signoff-commit
name : Sign-off Commit
entry : bash
args :
- -c
- |
if ! grep -q "^Signed-off-by: $(git config user.name) <$(git config user.email)>" "$(git rev-parse --git-path COMMIT_EDITMSG)"; then
printf "\nSigned-off-by: $(git config user.name) <$(git config user.email)>\n" >> "$(git rev-parse --git-path COMMIT_EDITMSG)"
fi
language : system
verbose : true
stages : [ commit-msg]
2026-07-19 00:03:07 -06:00
- id : check-test-ci-coverage
name : Ensure test files have pytestmarks
entry : python tools/pre_commit/check_test_marks.py
language : python
types : [ python]
files : ^tests/
2026-08-09 06:30:05 -07:00
- id : check-tts-adapter-migration
name : Ratchet TTS per-model branches out of serving_speech.py
entry : python tools/pre_commit/check_tts_adapter.py
language : python
pass_filenames : false
2026-08-17 12:14:26 +08:00
files : ^(vllm_omni/entrypoints/openai/serving_speech\.py|tools/pre_commit/check_tts_adapter\.py)$
2026-08-10 17:08:31 -04:00
# The budget-is-now-slack reminder is printed on a PASSING run, and
# pre-commit hides output from passing hooks unless the hook is verbose.
verbose : true
2026-08-09 06:30:05 -07:00
2025-11-24 13:14:08 +08:00
# Keep `suggestion` last
- id : suggestion
name : Suggestion
entry : bash -c 'echo "To bypass all the pre-commit hooks, add --no-verify to git commit. To skip a specific hook, prefix the commit command with SKIP=<hook-id>."'
language : system
verbose : true
pass_filenames : false
# Insert new entries above the `suggestion` entry
2025-12-22 08:21:16 +08:00
- id : check-pickle-imports
name : Prevent new pickle/cloudpickle imports
entry : python tools/pre_commit/check_pickle_imports.py
language : python
types : [ python]
additional_dependencies : [ regex]