-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
114 lines (112 loc) · 2.94 KB
/
.pre-commit-config.yaml
File metadata and controls
114 lines (112 loc) · 2.94 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
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
ci:
autoupdate_schedule: quarterly
exclude: |
(?x)^(
extern/ |
StructuralGT/deeplearner.py
)$
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 'v6.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: [python, cython]
args:
- --license-file=LICENSE
- --start=0
- --num=1
- --add=This file is from the StructuralGT project, released under the BSD 3-Clause
- --add=License.
- --keep-before=#!
- id: fix-license-header
name: Fix License Headers (C++)
types_or: [c, c++]
args:
- --license-file=LICENSE
- --start=0
- --num=1
- --add=This file is from the StructuralGT project, released under the BSD 3-Clause
- --add=License.
- --comment-prefix=//
- repo: https://github.com/asottile/pyupgrade
rev: 'v3.21.2'
hooks:
- id: pyupgrade
args:
- --py36-plus
- repo: https://github.com/PyCQA/isort
rev: '7.0.0'
hooks:
- id: isort
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: 'v21.1.8'
hooks:
- id: clang-format
exclude: Util\.h$
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
language: system
types: [c++]
exclude: |
(?x)^(
^extern/
)
args:
- --warnings-as-errors=*
- id: cppcheck
stages: [manual] # Requires cppcheck.
# Ignore external files and those taken verbatim from HOOMD.
name: cppcheck
entry: cppcheck
language: system
types: [c++]
exclude: |
(?x)^(
^extern/
)
args:
- cpp/
- --enable=warning,style,performance,portability # Ignore unused (could be used by Cython).
- --std=c++14
- --language=c++ # Force C++ for .h header files.
- --inline-suppr # Enable inline suppresions of warnings.
- --suppress=*:extern/*
- --error-exitcode=1