-
Notifications
You must be signed in to change notification settings - Fork 1
/
.clang-tidy
52 lines (47 loc) · 3.43 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
42
43
44
45
46
47
48
49
50
51
# Copyright 2020-2024 Alfredo A. Correa
WarningsAsErrors: '*'
HeaderFilterRegex: '.'
FormatStyle: file
CheckOptions:
- { key: readability-identifier-naming.ClassCase , value: lower_case }
- { key: readability-identifier-naming.FunctionCase , value: lower_case }
- { key: readability-identifier-naming.GlobalConstantCase , value: aNy_CasE }
- { key: readability-identifier-length.IgnoredLoopCounterNames , value: "^[ijk_]$" }
- { key: readability-identifier-length.IgnoredVariableNames , value: "^[ijk_]$" }
- { key: readability-identifier-length.MethodCase , value: lower_case }
- { key: readability-identifier-length.MinimumLoopCounterNameLength , value: 2 }
- { key: readability-identifier-length.MinimumParameterNameLength , value: 2 }
- { key: readability-identifier-length.MinimumVariableNameLength , value: 2 }
- { key: readability-identifier-naming.NamespaceCase , value: lower_case }
- { key: readability-identifier-naming.PrivateMemberPrefix , value: '' }
- { key: readability-identifier-naming.PrivateMemberSuffix , value: _ }
- { key: readability-identifier-naming.PrivateMethodSuffix , value: _ }
- { key: readability-identifier-naming.StructCase , value: lower_case }
- { key: readability-identifier-naming.TemplateParameterCase , value: CamelCase }
- { key: readability-identifier-naming.TypeTemplateParameterIgnoredRegexp, value: expr-type}
- { key: readability-operators-representation.BinaryOperators , value: '&&;&=;&;|;~;!;!=;||;|=;^;^='}
# value: expr-type , bug in clang 16 in c++20 mode https://stackoverflow.com/a/75157215/225186
# for range-for loops, e.g. `for(auto i : is) ...`
# - { key: readability-identifier-length.IgnoredVariableNames , value: "^[ijk]$" }
Checks: '*,
-altera-struct-pack-align,
-boost-use-ranges,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-macro-usage,
-fuchsia-overloaded-operator,
-fuchsia-trailing-return,
-llvmlibc-*,
-modernize-use-nodiscard,
-readability-magic-numbers'
## explanation of the suppressed rules above:
# -altera-struct-pack-align, // this asks to use non-standard pragmas such as __attribute__((aligned(0))) and _attribute__((packed)), may interfeere with gcc/nvcc compatibility?
# -boost-use-ranges // would introduce a dependency on Boost
# -clang-diagnostic-deprecated-declarations // some test run deprecated functions on purpose
# -cppcoreguidelines-avoid-magic-numbers, // all tests use magic numbers
# -cppcoreguidelines-macro-usage, // BLAS adaptors uses a lot of macros
# -fuchsia-overloaded-operator, // this library overloads operators (==, <, +, &)
# -llvmlibc-*, // nonsense warnings, for llvm developers
# -llvm-header-guard, // allow PCH
# -misc-include-cleaner // allow PCH
# -modernize-use-nodiscard, // this would add [[nodiscard]] to almost all functions, adding a lot of noise
# -readability-magic-numbers, // many tests use magic numbers