-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
65 lines (65 loc) · 2.21 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
65 lines (65 loc) · 2.21 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: pretty-format-json
args: [--autofix, --no-sort-keys]
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: 'v17.0.6' # The default in Ubuntu 22.04, which is used in our CI
hooks:
- id: clang-format
types_or: [c++]
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.13
hooks:
- id: cmake-format
- id: cmake-lint
- repo: https://github.com/fsfe/reuse-tool
rev: v4.0.3
hooks:
- id: reuse
- repo: https://github.com/crate-ci/typos
rev: v1.23.1
hooks:
- id: typos
- repo: local
hooks:
# The official reuse hook only supports calling lint, so we need our own hook
# For MIT License
- id: reuse-annotate-mit
name: reuse-annotate-mit
entry: reuse annotate --license MIT --copyright 'NeoN authors' --merge-copyright
language: python
additional_dependencies: [reuse==2.1.0]
types_or: [c, c++, inc, python]
# .cmake-format.py, doc/conf.py use Unlicense
# don't have NeoN license for script/package.py
exclude: |
(?x)^(
.cmake-format.py|
doc/conf.py|
scripts/package.py|
)$
# For Unlicense
- id: reuse-annotate-unlicense
name: reuse-annotate-unlicense
entry: reuse annotate --license Unlicense --copyright 'NeoN authors' --merge-copyright
language: python
additional_dependencies: [reuse==2.1.0]
types_or: [cmake, gitignore, toml]
# CPM.cmake from others. note: the current CPM.cmake can not be parsed by reuse annotate
exclude: |
(?x)^(
REUSE.toml|
cmake/CPM.cmake
)$
# Some specific files for Unlicense
- id: reuse-annotate-unlicense-files
name: reuse-annotate-unlicense-files
entry: reuse annotate --license Unlicense --copyright 'NeoN authors' --merge-copyright
language: python
additional_dependencies: [reuse==2.1.0]
files: .cmake-format.py|doc/conf.py