|
4 | 4 | # this codebase and we do not intend to fix. The disabled checks appearing
|
5 | 5 | # thereafter in a separate alphabetical list have yet to be triaged. We may
|
6 | 6 | # fix their errors or recategorise them as checks we don't care about.
|
7 |
| -# |
8 |
| -# Comments on the checks we have decided are not worthwhile: |
9 |
| -# |
10 |
| -# * bugprone-throw-keyword-missing |
11 |
| -# This check is too time consuming. Disable it for now to save CI time. |
12 |
| -# |
13 |
| -# * cert-dcl21-cpp (postfix operator++ and operator-- should return const objects) |
14 |
| -# This is an unconventional code style, and conflicts with |
15 |
| -# readability-const-return-type. |
16 |
| -# |
17 |
| -# * cert-env33-c (calls to system, popen) |
18 |
| -# Unlikely to catch bugs, and using system is convenient for portability. |
19 |
| -# |
20 |
| -# * cert-dcl37-c and cert-dcl-51-cpp (reserved identifiers) |
21 |
| -# These two checks are aliases for bugprone-reserved-identifier. |
22 |
| -# Don't repeatedly run the same check for three times. |
23 |
| -# |
24 |
| -# * cert-err58-cpp (exceptions from static variable declarations) |
25 |
| -# We have lots of memory allocations in static variable declarations, and |
26 |
| -# that's fine. |
27 |
| -# |
28 |
| -# * clang-analyzer-core.{DivideZero,NonNullParamChecker,UndefinedBinaryOperatorResult} |
29 |
| -# * clang-analyzer-cplusplus.NewDelete |
30 |
| -# They report too many false positives. |
31 |
| -# |
32 |
| -# * modernize-use-auto |
33 |
| -# We prefer an almost-always-avoid-auto style. |
34 |
| -# |
35 |
| -# * modernize-use-trailing-return-type |
36 |
| -# An arbitrary style convention we haven't adopted. |
37 |
| -# |
38 |
| -# * readability-identifier-naming |
39 |
| -# We are not enforcing a standard identifier naming scheme in the code base. |
40 |
| -# This check does not bring much value at the moment and consumes a lot of CPU time. |
41 | 7 |
|
42 |
| -Checks: "\ |
43 |
| -bugprone-*,\ |
44 |
| -cata-*,\ |
45 |
| -cert-*,\ |
46 |
| --cert-dcl21-cpp,\ |
47 |
| --cert-env33-c,\ |
48 |
| --cert-dcl37-c,\ |
49 |
| --cert-dcl51-cpp,\ |
50 |
| --cert-err58-cpp,\ |
51 |
| --clang-analyzer-core.CallAndMessage,\ |
52 |
| --clang-analyzer-core.DivideZero,\ |
53 |
| --clang-analyzer-core.NonNullParamChecker,\ |
54 |
| --clang-analyzer-core.UndefinedBinaryOperatorResult,\ |
55 |
| --clang-analyzer-cplusplus.NewDelete,\ |
56 |
| -clang-diagnostic-*,\ |
57 |
| -cppcoreguidelines-slicing,\ |
58 |
| -google-explicit-constructor,\ |
59 |
| -llvm-namespace-comment,\ |
60 |
| -misc-*,\ |
61 |
| -modernize-*,\ |
62 |
| --modernize-use-auto,\ |
63 |
| --modernize-use-trailing-return-type,\ |
64 |
| -performance-*,\ |
65 |
| -readability-*,\ |
66 |
| --bugprone-assignment-in-if-condition,\ |
67 |
| --bugprone-easily-swappable-parameters,\ |
68 |
| --bugprone-empty-catch,\ |
69 |
| --bugprone-implicit-widening-of-multiplication-result,\ |
70 |
| --bugprone-narrowing-conversions,\ |
71 |
| --bugprone-switch-missing-default-case,\ |
72 |
| --bugprone-throw-keyword-missing,\ |
73 |
| --bugprone-unchecked-optional-access,\ |
74 |
| --bugprone-unhandled-exception-at-new,\ |
75 |
| --misc-confusable-identifiers,\ |
76 |
| --misc-const-correctness,\ |
77 |
| --misc-header-include-cycle,\ |
78 |
| --misc-include-cleaner,\ |
79 |
| --misc-no-recursion,\ |
80 |
| --misc-non-private-member-variables-in-classes,\ |
81 |
| --misc-use-anonymous-namespace,\ |
82 |
| --modernize-concat-nested-namespaces,\ |
83 |
| --modernize-macro-to-enum,\ |
84 |
| --modernize-pass-by-value,\ |
85 |
| --modernize-return-braced-init-list,\ |
86 |
| --modernize-use-default-member-init,\ |
87 |
| --modernize-use-nodiscard,\ |
88 |
| --performance-avoid-endl,\ |
89 |
| --performance-noexcept-swap,\ |
90 |
| --performance-no-automatic-move,\ |
91 |
| --readability-avoid-unconditional-preprocessor-if,\ |
92 |
| --readability-container-data-pointer,\ |
93 |
| --readability-convert-member-functions-to-static,\ |
94 |
| --readability-else-after-return,\ |
95 |
| --readability-function-cognitive-complexity,\ |
96 |
| --readability-identifier-length,\ |
97 |
| --readability-identifier-naming,\ |
98 |
| --readability-implicit-bool-conversion,\ |
99 |
| --readability-magic-numbers,\ |
100 |
| --readability-named-parameter,\ |
101 |
| --readability-simplify-boolean-expr,\ |
102 |
| --readability-suspicious-call-argument,\ |
103 |
| --readability-use-anyofallof,\ |
104 |
| -" |
| 8 | +Checks: [ |
| 9 | + bugprone-*, |
| 10 | + # This check is too time consuming. Disable it for now to save CI time. |
| 11 | + -bugprone-throw-keyword-missing, |
| 12 | + cata-*, |
| 13 | + cert-*, |
| 14 | + # * cert-dcl21-cpp (postfix operator++ and operator-- should return const objects) |
| 15 | + # This is an unconventional code style, and conflicts with |
| 16 | + # readability-const-return-type. |
| 17 | + -cert-dcl21-cpp, |
| 18 | + # * cert-env33-c (calls to system, popen) |
| 19 | + # Unlikely to catch bugs, and using system is convenient for portability. |
| 20 | + -cert-env33-c, |
| 21 | + # * cert-dcl37-c and cert-dcl-51-cpp (reserved identifiers) |
| 22 | + # These two checks are aliases for bugprone-reserved-identifier. |
| 23 | + # Don't repeatedly run the same check for three times. |
| 24 | + -cert-dcl37-c, |
| 25 | + -cert-dcl51-cpp, |
| 26 | + # * cert-err58-cpp (exceptions from static variable declarations) |
| 27 | + # We have lots of memory allocations in static variable declarations, and |
| 28 | + # that's fine. |
| 29 | + -cert-err58-cpp, |
| 30 | + # * clang-analyzer-core.{DivideZero,NonNullParamChecker,UndefinedBinaryOperatorResult} |
| 31 | + # * clang-analyzer-cplusplus.NewDelete |
| 32 | + # They report too many false positives. |
| 33 | + -clang-analyzer-core.CallAndMessage, |
| 34 | + -clang-analyzer-core.DivideZero, |
| 35 | + -clang-analyzer-core.NonNullParamChecker, |
| 36 | + -clang-analyzer-core.UndefinedBinaryOperatorResult, |
| 37 | + -clang-analyzer-cplusplus.NewDelete, |
| 38 | + # We often use enums as bitsets and do things like `enum::A | enum::B` |
| 39 | + # which is explicitly unsupported by this check, and it is officially recommended to disable |
| 40 | + # this lint for project that use such patterns. |
| 41 | + -clang-analyzer-optin.core.EnumCastOutOfRange, |
| 42 | + clang-diagnostic-*, |
| 43 | + cppcoreguidelines-slicing, |
| 44 | + google-explicit-constructor, |
| 45 | + llvm-namespace-comment, |
| 46 | + misc-*, |
| 47 | + # Extremely expensive, and we are not using `using` anyway, so it's not catching anything. |
| 48 | + -misc-unused-using-decls, |
| 49 | + modernize-*, |
| 50 | + # Rather expensive check, and it is unlikely that somebody |
| 51 | + # would *want* to use std::auto_ptr in %CURRENT_YEAR% (2025+) when unique_ptr is both better |
| 52 | + # and is a de-facto default in the codebase already. |
| 53 | + -modernize-replace-auto-ptr, |
| 54 | + # * modernize-use-auto |
| 55 | + # We prefer an almost-always-avoid-auto style. |
| 56 | + -modernize-use-auto, |
| 57 | + # * modernize-use-trailing-return-type |
| 58 | + # An arbitrary style convention we haven't adopted. |
| 59 | + -modernize-use-trailing-return-type, |
| 60 | + performance-*, |
| 61 | + readability-*, |
| 62 | + # * readability-identifier-naming |
| 63 | + # We are not enforcing a standard identifier naming scheme in the code base. |
| 64 | + # This check does not bring much value at the moment and consumes a lot of CPU time. |
| 65 | + -readability-identifier-length, |
| 66 | + -readability-identifier-naming, |
| 67 | + # disabled due to behaviour change between pre-module and post-module world. |
| 68 | + # Reevaluate in 2027(?) when the code is sufficiently migrated to C++20 modules |
| 69 | + # or when there is a decision not perform the migration |
| 70 | + -readability-redundant-inline-specifier, |
| 71 | + |
| 72 | + # ==== Untriaged checks follow ==== |
| 73 | + # Either fix the code and re-enable the check, |
| 74 | + # or add a good comment and move to the appropriate section above. |
| 75 | + # Silencing the existing errors with a //NOLINT does count as a "fix", as that still |
| 76 | + # prevents new issues from cropping up. |
| 77 | + -bugprone-assignment-in-if-condition, |
| 78 | + -bugprone-easily-swappable-parameters, |
| 79 | + -bugprone-empty-catch, |
| 80 | + -bugprone-implicit-widening-of-multiplication-result, |
| 81 | + -bugprone-narrowing-conversions, |
| 82 | + -bugprone-switch-missing-default-case, |
| 83 | + -bugprone-unchecked-optional-access, |
| 84 | + -bugprone-unhandled-exception-at-new, |
| 85 | + -bugprone-unused-local-non-trivial-variable, # great lint, but hard to fix |
| 86 | + -misc-confusable-identifiers, |
| 87 | + -misc-const-correctness, |
| 88 | + -misc-header-include-cycle, |
| 89 | + -misc-include-cleaner, |
| 90 | + -misc-no-recursion, |
| 91 | + -misc-non-private-member-variables-in-classes, |
| 92 | + -misc-use-anonymous-namespace, |
| 93 | + -modernize-concat-nested-namespaces, |
| 94 | + -modernize-macro-to-enum, |
| 95 | + -modernize-pass-by-value, |
| 96 | + -modernize-return-braced-init-list, |
| 97 | + -modernize-use-default-member-init, |
| 98 | + -modernize-use-nodiscard, |
| 99 | + -performance-avoid-endl, |
| 100 | + -performance-enum-size, # untriaged since upgrade to LLVM 18 |
| 101 | + -performance-noexcept-swap, |
| 102 | + -performance-no-automatic-move, |
| 103 | + -readability-avoid-nested-conditional-operator, # great lint, but hard to fix |
| 104 | + -readability-avoid-unconditional-preprocessor-if, |
| 105 | + -readability-container-data-pointer, |
| 106 | + -readability-convert-member-functions-to-static, |
| 107 | + -readability-else-after-return, |
| 108 | + -readability-function-cognitive-complexity, |
| 109 | + -readability-implicit-bool-conversion, |
| 110 | + -readability-magic-numbers, |
| 111 | + -readability-named-parameter, |
| 112 | + -readability-redundant-casting, # probably good lint, just needs fixing |
| 113 | + -readability-simplify-boolean-expr, |
| 114 | + -readability-suspicious-call-argument, |
| 115 | + -readability-use-anyofallof, |
| 116 | +] |
| 117 | + |
105 | 118 | WarningsAsErrors: '*'
|
106 | 119 | HeaderFilterRegex: '(src|test|tools).*'
|
107 | 120 | FormatStyle: none
|
|
0 commit comments