-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy path.pre-commit-config.yaml
42 lines (40 loc) · 1.13 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
repos:
- repo: https://github.com/doublify/pre-commit-clang-format
rev: 62302476d0da01515660132d76902359bed0f782
hooks:
- id: clang-format
types: [file]
files: \.(cc|c|h|cpp|hh)$
args: ["--style={
BasedOnStyle: gnu,
ContinuationIndentWidth: 2,
# Unfortunately, a bug in clang-format makes this ineffective
IndentExternBlock: NoIndent,
SpaceAfterCStyleCast: true,
SpacesInLineCommentPrefix: {
Minimum: 0,
Maximum: -1
}
}"]
- repo: https://github.com/pycqa/flake8
rev: 7.1.1
hooks:
- id: flake8
additional_dependencies:
- flake8-bugbear
- flake8-builtins
- flake8-comprehensions
- pygments
args: ["--config=.flake8"]
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black
args: ["--line-length=79"]
- repo: local
hooks:
- id: check-formatting
name: check-formatting
entry: python .check-formatting.py
language: system
args: ["--autofix", "--ignore-non-source"]