-
Notifications
You must be signed in to change notification settings - Fork 171
/
.pre-commit-config.yaml
103 lines (90 loc) · 2.34 KB
/
.pre-commit-config.yaml
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
repos:
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: 'v18.1.8'
hooks:
- id: clang-format
types_or: [file]
files: \.(cpp|hpp|ipp|cu|cuh)$
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
exclude: \.(diff|patch)$
- id: end-of-file-fixer
exclude: \.(diff|patch)$
- id: check-yaml
- id: check-added-large-files
# Using this mirror lets us use mypyc-compiled black, which is about 2x faster
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.4.2
hooks:
- id: black-jupyter
- repo: https://github.com/BlankSpruce/gersemi
rev: 0.15.0
hooks:
- id: gersemi
args: ["-i", "--no-warn-about-unknown-commands"]
- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
hooks:
- id: codespell
args: [
"-S", "*.ipynb,*.onnx,_build,*.svg",
"-I", "./CI/codespell_ignore.txt"
]
exclude: ^CI/.*$
- repo: local
hooks:
- id: license
name: license
language: system
entry: CI/check_license.py --fix
files: \.(cpp|hpp|ipp|cu|cuh)$
- repo: local
hooks:
- id: include_guards
name: include_guards
language: system
entry: CI/check_include_guards.py --fail-global
files: \.hpp$
- repo: local
hooks:
- id: pragma_once
name: pragma_once
language: system
entry: CI/check_pragma_once.sh
files: \.hpp$
- repo: local
hooks:
- id: type_t
name: type_t
language: system
entry: CI/check_type_t.py
files: \.(cpp|hpp|ipp|cu|cuh)$
- repo: local
hooks:
- id: boost_test
name: boost_test
language: system
entry: CI/check_boost_test_macro.sh
files: ^Tests\/.*\.(cpp|hpp|ipp|cu|cuh)$
- repo: local
hooks:
- id: cmake_options
name: cmake_options
language: system
entry: docs/parse_cmake_options.py --write docs/getting_started.md
files: ^CMakeLists.txt$
- repo: local
hooks:
- id: leftover_conflict_markers
name: Leftover conflict markers
language: system
entry: git diff --staged --check
- repo: local
hooks:
- id: math_macros
name: math_macros
language: system
entry: CI/check_math_macros.py
files: \.(cpp|hpp|ipp|cu|cuh)$