-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
79 lines (79 loc) · 1.87 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
# Kanged from https://github.com/TheochemUI/eOn
fail_fast: false
exclude: |
(?x)(
approved_files| # autogenerated
subprojects # vendored
)
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: trailing-whitespace
exclude: |
(?x)^(
docs/.* # Exclude docs folder
)$
- id: end-of-file-fixer
exclude: |
(?x)^(
docs/.* # Exclude docs folder
)$
- id: check-yaml
- id: check-added-large-files
- repo: local
hooks:
- id: cppcheck
name: cppcheck
entry: cppcheck
language: system
types_or: [c++, c]
args: [
"--error-exitcode=1",
"--std=c++20",
"--language=c++",
"--check-level=exhaustive",
]
- id: cpplint
name: cpplint
entry: cpplint
language: system
types_or: [c++, c]
args: [
"--filter=-whitespace/comments,
-runtime/references,
-whitespace/indent,
-whitespace/parens,
-whitespace/braces,
-whitespace/line_length,
-whitespace/newline,
-build/include_order,
-readability/todo,
-readability/fn_size,
-build/namespaces,"
]
- id: clang-format
name: clang-format
entry: clang-format
language: system
types_or: [c, c++, cuda]
args: ["-fallback-style=none", "-style=file", "-i"]
- id: meson-format
name: meson format
entry: meson
language: system
types: [meson]
files: \.build$
args: ["format", "-i"]
- id: ruff-lint-fixes
name: ruff check
entry: ruff
language: system
types_or: [ python, pyi, jupyter ]
args: ["check", "--fix", "--unsafe-fixes", "."]
- id: ruff-format
name: ruff format
entry: ruff
language: system
types_or: [ python, pyi, jupyter ]
args: ["format", "."]