-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
57 lines (50 loc) · 1.58 KB
/
.pre-commit-config.yaml
File metadata and controls
57 lines (50 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
default_install_hook_types: [pre-commit, commit-msg]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: check-json
- id: check-toml
- id: check-merge-conflict
- id: debug-statements
- id: mixed-line-ending
- repo: local
hooks:
- id: format
name: Format
language: system
entry: uv run tools/codestyle/format.sh
types: [python]
pass_filenames: true
# - id: typecheck
# name: Typecheck (advisory)
# language: system
# entry: bash -c 'uv run tools/codestyle/typecheck.sh || true'
# types: [python]
# pass_filenames: false
# verbose: true
- id: copyright-fix
name: Copyright Fix
language: system
entry: uv run --script tools/codestyle/copyright_fixer.py
types_or: [python, shell]
pass_filenames: true
- id: uv-lock
name: uv lock check
language: system
entry: bash -c 'uv lock && git diff --exit-code uv.lock'
files: pyproject.toml
stages: [pre-commit]
pass_filenames: false
- id: check-signoff
name: Check commit is signed off (DCO)
entry: "grep -qE '^Signed-off-by: .+ <.+>'"
language: system
stages: [commit-msg]
always_run: true