-
Notifications
You must be signed in to change notification settings - Fork 57
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
72 lines (71 loc) · 1.83 KB
/
.pre-commit-config.yaml
File metadata and controls
72 lines (71 loc) · 1.83 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Global exclude pattern
exclude: |
(?x)^(
3rdParty/.*|
cpp/common/json/jsmn\.h$|
kernelSrcs/.*|
)$
repos:
- repo: https://github.com/pycqa/isort
rev: 8.0.1
hooks:
- id: isort
- repo: https://github.com/Lucas-C/pre-commit-hooks.git
rev: v1.5.6
hooks:
- id: remove-crlf
- id: insert-license
files: \.py$
args:
- --license-filepath
- LICENSE_HEADER
- --comment-style
- "#"
- --detect-license-in-X-top-lines=20
- --allow-past-years
- id: insert-license
files: \.(cpp|cu|cuh|h|hpp)$
exclude: |
(?x)^(
.*cubin.cpp$ |
.*_cubin.h |
3rdParty/.*
)$
args:
- --license-filepath
- LICENSE_HEADER
- --comment-style
- /*| *| */
- --detect-license-in-X-top-lines=20
- --allow-past-years
- repo: https://github.com/google/yapf
rev: v0.43.0
hooks:
- id: yapf
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v22.1.0
hooks:
- id: clang-format
types_or: [c++, c, cuda]
exclude: |
(?x)^(
.*cubin.cpp$ |
.*_cubin.h |
3rdParty/.*
)$
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.13
hooks:
- id: cmake-format
- repo: https://github.com/codespell-project/codespell
rev: v2.4.2
hooks:
- id: codespell
args:
- --ignore-words-list=rouge,inout,atleast,strat,nd,subtile,thrid,ans,datas,thw
exclude: '.*\.json$'
- repo: https://github.com/PyCQA/autoflake
rev: v2.3.3
hooks:
- id: autoflake
args: [--remove-all-unused-imports, --remove-unused-variables, --in-place, --recursive]