-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
153 lines (125 loc) · 3.8 KB
/
.pre-commit-config.yaml
File metadata and controls
153 lines (125 loc) · 3.8 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
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
ci:
autofix_prs: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
exclude: \.svg$|LICENSE
log_file: log_precommit_trailing-whitespace
- id: end-of-file-fixer # add EOF "\n" if missing
log_file: log_precommit_end-of-file-fixer
exclude: \.svg$|LICENSE
- id: check-merge-conflict
log_file: log_precommit_check-merge-conflict
- id: check-executables-have-shebangs
log_file: log_precommit_check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
log_file: log_precommit_check-shebang-scripts-are-executable
- id: check-added-large-files
args: ['--maxkb=50']
log_file: log_precommit_check-added-large-files
- id: check-case-conflict
log_file: log_precommit_check-case-conflict
- id: check-symlinks
#- id: check-xml
- id: check-yaml
args: [--unsafe]
log_file: log_precommit_check-yaml
- id: detect-private-key
log_file: log_precommit_detect-private-key
#- id: pretty-format-json
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: "v1.5.6"
hooks:
- id: forbid-tabs
exclude: Makefile|\.gitmodules
log_file: log_precommit_forbit-tabs
- id: remove-tabs
exclude: Makefile|\.gitmodules
log_file: log_precommit_remove-tabs
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.13
hooks:
- id: cmake-format
# - id: cmake-lint
#- repo: https://github.com/codespell-project/codespell
# rev: "v2.3.0"
# hooks:
# - id: codespell
#- repo: https://github.com/shellcheck-py/shellcheck-py
# rev: "v0.10.0.1"
# hooks:
# - id: shellcheck
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.1
hooks:
- id: check-github-workflows
log_file: log_precommit_check-github-workflows
# Clang format the codebase automatically
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v22.1.4
hooks:
- id: clang-format
types_or: [c++, c, cuda]
log_file: log_precommit_clang-format
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.12
hooks:
- id: ruff-check
args:
- --extend-select=BLE,I,NPY,PLE
- --ignore=E402,E711,E712,E713,E722,E741,F401,F403,F405,F841
- --fix
exclude: ^\.cmake-format\.py$
log_file: log_precommit_ruff_check
- id: ruff-format
args:
- --line-length=100
log_file: log_precommit_ruff_format
#- repo: https://github.com/johnor/pre-commit-lizard
# rev: 'v1.17.10'
# hooks:
# - id: lizard-cpp
#- repo: https://github.com/rhysd/actionlint
# rev: v1.7.7
# hooks:
# - id: actionlint
- repo: local
hooks:
- id: doxygen_header
name: "Check doxygen headers"
entry: python tools/check_doxygen_fileheader.py
language: python
pass_filenames: false
- id: license_check
name: "Check license headers"
entry: python tools/check_licencing.py
language: python
pass_filenames: false
- id: pragma_once_check
name: "Check #pragma once"
entry: python tools/check_pragma_once.py
language: python
pass_filenames: false
- id: check_sycl_include
name: "Check SYCL #include"
entry: python tools/check_sycl_include.py
language: python
pass_filenames: false
- id: check_no_ssh_in_submodules
name: "No ssh in git submodules remote"
entry: python tools/check_no_ssh_in_submodules.py
language: python
pass_filenames: false
- id: check_no_utf8
name: "No UTF-8 in files (except for authors)"
entry: python tools/check_no_utf8.py
language: python
pass_filenames: true
files: \.(cpp|hpp|py|cmake|txt)$
# - id: update_authors
# name: "Update authors"
# entry: python buildbot/update_authors.py
# language: python
# pass_filenames: true