forked from boutproject/BOUT-dev
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.clang-tidy
41 lines (33 loc) · 1.68 KB
/
.clang-tidy
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
---
Checks: 'clang-diagnostic-*,clang-analyzer-*,performance-*,readability-*,bugprone-*,clang-analyzer-*,cppcoreguidelines-*,mpi-*,misc-*,-readability-magic-numbers,-cppcoreguidelines-avoid-magic-numbers,-misc-non-private-member-variables-in-classes,-clang-analyzer-optin.mpi*,-bugprone-exception-escape,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-readability-function-cognitive-complexity,-misc-no-recursion,-bugprone-easily-swappable-parameters'
WarningsAsErrors: ''
HeaderFilterRegex: ''
FormatStyle: file
CheckOptions:
# Allow some common short names
- key: readability-identifier-length.IgnoredVariableNames
value: '^[dn]?[xyz]$'
- key: readability-identifier-length.IgnoredParameterNames
value: '^[dfijknxyz][01xyz]?$'
- key: readability-identifier-length.IgnoredLoopCounterNames
value: '^[ijkxyz_]$'
# Don't expand macros when simplifying boolean expressions,
# otherwise this breaks `ASSERT` macros!
- key: readability-simplify-boolean-expr.IgnoreMacros
value: 'true'
---
Disabled checks and reasons:
These are all basically unavoidable in HPC numeric code:
-readability-magic-numbers
-cppcoreguidelines-avoid-magic-numbers
-cppcoreguidelines-pro-bounds-pointer-arithmetic
-readability-function-cognitive-complexity
-bugprone-easily-swappable-parameters
This doesn't work very well:
-clang-analyzer-optin.mpi*
This is a suggestion, and is perfectly fine:
-misc-no-recursion
Expensive (and noisy, because we let exceptions escape from `main`):
-bugprone-exception-escape
TODO: This would be good to fix and re-enable:
-misc-non-private-member-variables-in-classes