forked from glotzerlab/freud
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
103 lines (101 loc) · 2.76 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
ci:
autoupdate_schedule: quarterly
exclude: (?:^extern/)
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 'v4.1.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/asottile/pyupgrade
rev: 'v2.31.0'
hooks:
- id: pyupgrade
args:
- --py36-plus
- repo: https://github.com/PyCQA/isort
rev: '5.10.1'
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: '21.12b0'
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: '4.0.1'
hooks:
- id: flake8
types: ["file"]
types_or: ["python", "cython"]
additional_dependencies: ["flake8-force"]
args:
- --show-source
- 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: 'v13.0.0'
hooks:
- id: clang-format
# 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 external files. Also exclude AABB.h because it uses intrinsics
# heavily and these are not considered portable.
exclude: |
(?x)^(
^cpp/locality/AABB\.h|
^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 external files. Also exclude AABB.h because it uses intrinsics
# heavily and these are not considered portable.
exclude: |
(?x)^(
^cpp/locality/AABB\.h|
^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=*:cpp/locality/AABB.h
- --suppress=*:extern/*
- --error-exitcode=1