-
Notifications
You must be signed in to change notification settings - Fork 50
/
Copy path.pre-commit-config.yaml
86 lines (84 loc) · 2.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
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
ci:
autoupdate_schedule: quarterly
autofix_prs: false
exclude: (?:^extern/)
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 'v5.0.0'
hooks:
- id: end-of-file-fixer
exclude: |
(?x)^(
^.*\.ai|
^.*\.txt\
^extern/
)
- id: trailing-whitespace
exclude: |
(?x)^(
^.*\.ai|
^.*\.txt|
^extern/|
^setup.cfg
)
- id: check-builtin-literals
- id: check-executables-have-shebangs
- id: check-json
- id: check-yaml
- id: debug-statements
- id: requirements-txt-fixer
- repo: https://github.com/glotzerlab/fix-license-header
rev: v0.4.1
hooks:
- id: fix-license-header
name: Fix License Headers (Python)
exclude: |
(?x)(
^doc/|
^extern/|
^requirements/
)
types_or: [c, c++, python]
args:
- --license-file=LICENSE
- --start=2
- --num=1
- --add=This file is from the freud project, released under the BSD 3-Clause License.
- --keep-before=#!
- repo: https://github.com/asottile/pyupgrade
rev: 'v3.19.1'
hooks:
- id: pyupgrade
args:
- --py39-plus
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.9.4'
hooks:
- id: ruff-format
- id: ruff
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.13
hooks:
- id: cmake-format
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: 'v19.1.7'
hooks:
- id: clang-format
types_or: [c, c++]
# The following pre-commit hooks should only be run manually because they have
# dependencies that cannot be pip installed.
- repo: local
hooks:
- id: clang-tidy
stages: [manual] # Requires clang-tidy.
name: clang-tidy
entry: clang-tidy-18
language: system
types: [c++]
# Exclude external files.
exclude: |
(?x)^(
^extern/
)
args:
- --warnings-as-errors=*