-
Notifications
You must be signed in to change notification settings - Fork 2
/
.pre-commit-config.yaml
128 lines (127 loc) · 4.18 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
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
---
# SPDX-FileCopyrightText: Copyright DB Netz AG
# SPDX-License-Identifier: CC0-1.0
repos:
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.1
hooks:
- id: insert-license
name: Insert license headers (Markdown)
args:
- --detect-license-in-X-top-lines=15
- --license-filepath
- LICENSES/.license_header_cc0.txt
- --comment-style
- <!--| ~| -->
types_or: [markdown]
files: ''
- id: insert-license
name: Insert license headers (XML)
args:
- --detect-license-in-X-top-lines=15
- --license-filepath
- LICENSES/.license_header_cc0.txt
- --insert-license-after-regex
- ^<\?xml.*\?>
- --comment-style
- <!--| ~| -->
types_or: [xml]
files: ''
- id: insert-license
name: Insert license headers (C, C++, CSS)
args:
- --detect-license-in-X-top-lines=15
- --license-filepath
- LICENSES/.license_header.txt
- --comment-style
- /*| *| */
types_or: [c, c++, css]
files: ''
- id: insert-license
name: Insert license headers (Python)
args:
- --detect-license-in-X-top-lines=15
- --license-filepath
- LICENSES/.license_header.txt
- --comment-style
- '#'
types_or: [python]
files: ''
- id: insert-license
name: Insert license headers (CMake, Shell)
args:
- --detect-license-in-X-top-lines=15
- --license-filepath
- LICENSES/.license_header_cc0.txt
- --comment-style
- '#'
types_or: [gitmodules, gitignore, cmake, shell]
files: ''
- id: insert-license
name: Insert license headers (YAML)
args:
- --detect-license-in-X-top-lines=15
- --license-filepath
- LICENSES/.license_header_cc0.txt
- --insert-license-after-regex
- ^---$
- --comment-style
- '#'
types_or: [yaml]
files: ''
- id: insert-license
name: Insert license headers (Doxyfile)
args:
- --detect-license-in-X-top-lines=15
- --license-filepath
- LICENSES/.license_header_cc0.txt
- --comment-style
- '#'
files: Doxyfile
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: mixed-line-ending
args: [--fix=lf]
- id: trailing-whitespace
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: 0.2.3
hooks:
- id: yamlfmt
- repo: https://github.com/pre-commit/mirrors-yapf
rev: v0.32.0
hooks:
- id: yapf
- repo: https://github.com/pocc/pre-commit-hooks
rev: v1.3.5
hooks:
- id: clang-format
args: [-i]
- id: clang-tidy
# More agressive fixing, but not as reliably
# args: ["-p=build", "--fix-notes", "--fix-errors", "-extra-arg=-ferror-limit=0"]
args: [-p=build, --fix]
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.13
hooks:
- id: cmake-format
additional_dependencies: [pyyaml==5.3.1]
exclude: CPM.cmake
# verbose: true
- id: cmake-lint
exclude: CPM.cmake
- repo: local
hooks:
- id: include-what-you-use
name: include-what-you-use
entry: python ./tools/iwyu_precommit.py
language: python
pass_filenames: true
verbose: true
require_serial: true
types: [c++]
stages: [manual]
- repo: https://github.com/fsfe/reuse-tool
rev: v2.1.0
hooks:
- id: reuse