mirror of
https://github.com/NVIDIA/TensorRT-LLM.git
synced 2026-01-13 22:18:36 +08:00
89 lines
2.5 KiB
YAML
89 lines
2.5 KiB
YAML
default_install_hook_types: [pre-commit, commit-msg]
|
|
repos:
|
|
- repo: https://github.com/pycqa/isort
|
|
rev: 5.12.0
|
|
hooks:
|
|
- id: isort
|
|
- repo: https://github.com/Lucas-C/pre-commit-hooks.git
|
|
rev: v1.5.5
|
|
hooks:
|
|
- id: remove-crlf
|
|
- repo: https://github.com/google/yapf
|
|
rev: v0.43.0
|
|
hooks:
|
|
- id: yapf
|
|
exclude: ".*/auto_deploy/.*"
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v4.1.0
|
|
hooks:
|
|
- id: check-added-large-files
|
|
exclude: |
|
|
(?x)^(.*cubin.cpp)$
|
|
- id: check-merge-conflict
|
|
- id: check-symlinks
|
|
- id: detect-private-key
|
|
- id: end-of-file-fixer
|
|
- id: check-yaml
|
|
args: [--allow-multiple-documents]
|
|
exclude: ".*/gitlab/.*.yml"
|
|
- id: trailing-whitespace
|
|
- id: check-toml
|
|
- id: mixed-line-ending
|
|
args: [--fix=lf]
|
|
files: ".*/auto_deploy/.*"
|
|
- id: debug-statements
|
|
files: ".*/auto_deploy/.*"
|
|
- id: check-json
|
|
files: ".*/auto_deploy/.*"
|
|
exclude: >
|
|
(?x)^(
|
|
.*\.vscode/.*\.json | # vscode files can take comments
|
|
.*\.devcontainer/.*\.json # devcontainer json files can take comments
|
|
)$
|
|
- repo: https://github.com/PyCQA/autoflake
|
|
rev: v2.3.1
|
|
hooks:
|
|
- id: autoflake
|
|
additional_dependencies:
|
|
- tomli
|
|
args: ['--config', 'pyproject.toml']
|
|
- repo: https://github.com/pre-commit/mirrors-clang-format
|
|
rev: v16.0.0
|
|
hooks:
|
|
- id: clang-format
|
|
types_or: [c++, c, cuda]
|
|
exclude: |
|
|
(?x)^(.*cubin.cpp$ | .*fmha_cubin.h)$
|
|
- repo: https://github.com/cheshirekow/cmake-format-precommit
|
|
rev: v0.6.10
|
|
hooks:
|
|
- id: cmake-format
|
|
- repo: https://github.com/codespell-project/codespell
|
|
rev: v2.4.1
|
|
hooks:
|
|
- id: codespell
|
|
additional_dependencies:
|
|
- tomli
|
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
rev: v0.9.4
|
|
hooks:
|
|
- id: ruff
|
|
args: [--fix, --exit-non-zero-on-fix]
|
|
files: ".*/auto_deploy/.*"
|
|
- id: ruff-format
|
|
files: ".*/auto_deploy/.*"
|
|
- repo: https://github.com/executablebooks/mdformat
|
|
rev: 0.7.17
|
|
hooks:
|
|
- id: mdformat
|
|
additional_dependencies:
|
|
- mdformat_frontmatter
|
|
files: ".*/auto_deploy/.*"
|
|
- repo: local
|
|
hooks:
|
|
- id: DCO check
|
|
name: Checks the commit message for a developer certificate of origin signature
|
|
entry: ./scripts/dco_check.py
|
|
language: script
|
|
stages: [commit-msg]
|