|
11 | 11 | # `git diff -U0 --no-color | clang-tidy-diff.py -p1 -path path/to/compile_commands.json`
|
12 | 12 | #
|
13 | 13 | InheritParentConfig: false
|
| 14 | + |
14 | 15 | # See https://clang.llvm.org/extra/clang-tidy/checks/list.html for a full list of available checks.
|
15 |
| -# Note: We would like to enable `misc-const-correctness` (introduced with Clang 15), but it currently |
16 |
| -# seems to be somewhat buggy still (producing false positives) => revisit at some point. |
| 16 | +# We disable a number of checks that cause frequent false positives, including: |
| 17 | +# -bugprone-unchecked-optional-access treats std::optional::value as "unchecked" |
| 18 | +# -misc-include-cleaner can't deal with "interface headers" such as sycl.hpp |
| 19 | +# -misc-unused-using-decls complains about "using sub_group = sycl::sub_group" (API export) |
| 20 | +# -readability-convert-member-functions-to-static lints against implementations of fmt::formatter |
17 | 21 | Checks: -*,
|
18 | 22 | bugprone-*,
|
19 | 23 | -bugprone-easily-swappable-parameters,
|
20 | 24 | -bugprone-lambda-function-name,
|
21 | 25 | -bugprone-macro-parentheses,
|
| 26 | + -bugprone-unchecked-optional-access, |
22 | 27 | misc-*,
|
23 |
| - -misc-const-correctness, |
| 28 | + -misc-include-cleaner, |
| 29 | + -misc-misplaced-const, |
24 | 30 | -misc-no-recursion,
|
25 | 31 | -misc-non-private-member-variables-in-classes,
|
26 | 32 | -misc-unused-parameters,
|
| 33 | + -misc-unused-using-decls, |
| 34 | + -misc-use-anonymous-namespace, |
27 | 35 | clang-analyzer-*,
|
| 36 | + -clang-analyzer-optin.mpi.MPI-Checker, |
28 | 37 | clang-diagnostic-*,
|
29 | 38 | cppcoreguidelines-*,
|
30 | 39 | -cppcoreguidelines-avoid-c-arrays,
|
31 | 40 | -cppcoreguidelines-avoid-do-while,
|
32 | 41 | -cppcoreguidelines-avoid-magic-numbers,
|
33 | 42 | -cppcoreguidelines-macro-usage,
|
34 | 43 | -cppcoreguidelines-non-private-member-variables-in-classes,
|
| 44 | + -cppcoreguidelines-pro-bounds-array-to-pointer-decay, |
| 45 | + -cppcoreguidelines-pro-bounds-constant-array-index, |
35 | 46 | -cppcoreguidelines-pro-bounds-pointer-arithmetic,
|
| 47 | + -cppcoreguidelines-pro-type-const-cast, |
| 48 | + -cppcoreguidelines-pro-type-reinterpret-cast, |
36 | 49 | mpi-*,
|
37 | 50 | performance-*,
|
38 | 51 | -performance-enum-size,
|
39 | 52 | readability-*,
|
40 | 53 | -readability-avoid-const-params-in-decls,
|
| 54 | + -readability-convert-member-functions-to-static, |
| 55 | + -readability-else-after-return, |
41 | 56 | -readability-function-cognitive-complexity,
|
42 | 57 | -readability-identifier-length,
|
43 | 58 | -readability-magic-numbers,
|
44 | 59 | -readability-qualified-auto,
|
| 60 | + -readability-redundant-inline-specifier, |
45 | 61 | -readability-uppercase-literal-suffix,
|
46 | 62 |
|
47 | 63 | CheckOptions:
|
| 64 | + - key: misc-const-correctness.WarnPointersAsValues |
| 65 | + value: true |
48 | 66 | # Naming conventions
|
49 | 67 | - key: readability-identifier-naming.ClassCase
|
50 | 68 | value: lower_case
|
|
0 commit comments