# See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks exclude: "third_party/" repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v3.2.0 hooks: - id: trailing-whitespace exclude: patches/ - id: end-of-file-fixer exclude: patches/ exclude_types: ["image", "jupyter"] - id: check-yaml exclude: patches/ - id: check-json - id: check-merge-conflict exclude: patches/ - id: check-added-large-files - id: mixed-line-ending - repo: https://github.com/psf/black rev: 25.11.0 hooks: - id: black - repo: https://github.com/pre-commit/mirrors-clang-format rev: 'v18.1.4' hooks: - id: clang-format - repo: https://github.com/hukkin/mdformat rev: 0.7.21 hooks: - id: mdformat additional_dependencies: - mdformat-gfm - mdformat-black - mdformat-frontmatter - repo: https://github.com/Lucas-C/pre-commit-hooks rev: v1.5.5 hooks: - id: forbid-tabs exclude: ".gitmodules|patches/.*|docs/development/git_chores.md|build_tools/packaging/linux/template/debian_rules.j2|third-party/sysdeps/linux/libdrm/patch_source.sh" - repo: https://github.com/rhysd/actionlint rev: v1.7.10 hooks: - id: actionlint args: [-shellcheck=, -ignore, 'label ".+" is unknown'] - repo: local hooks: - id: forbidden-paths name: Forbid secrets, certificates, keys, and executables entry: "File matched a forbidden file path pattern. Do not commit secrets, key material, certificates, or Windows executables." language: fail files: '(^|/)([^/]*\.(pem|key|exe|crt|cer|p12|pfx|der|csr|gpg|asc)|\.env|id_(rsa|dsa|ecdsa|ed25519))$' - id: test-file-naming name: Enforce *_test.py naming for build_tools tests entry: "Test files must use the *_test.py naming convention, not test_*.py" language: fail files: '^build_tools/(.*/)?tests/test_[^/]*\.py$'