| 1 |
# List of rationales for check suppressions (where known). |
| 2 |
# This have to precede the list because inline comments are not |
| 3 |
# supported by clang-tidy. |
| 4 |
# |
| 5 |
# -cppcoreguidelines-non-private-member-variables-in-classes, |
| 6 |
# -misc-non-private-member-variables-in-classes, |
| 7 |
# We intend a gradual transition to conform to this guideline, but it |
| 8 |
# is not practical to implement yet. |
| 9 |
# |
| 10 |
# -readability-isolate-declaration, |
| 11 |
# Declarations like "int a, b;" are readable. Some forms are not, and |
| 12 |
# those might reasonably be suggested against during code review. |
| 13 |
# |
| 14 |
# -cppcoreguidelines-avoid-c-arrays, |
| 15 |
# C arrays are still necessary in many places with legacy code |
| 16 |
# |
| 17 |
# -cppcoreguidelines-avoid-magic-numbers, |
| 18 |
# -readability-magic-numbers, |
| 19 |
# We have many legitimate use cases for magic numbers |
| 20 |
# |
| 21 |
# -cppcoreguidelines-macro-usage, |
| 22 |
# We do use too many macros, and we should fix many of them, but there |
| 23 |
# is no reasonable way to suppress the check e.g. in src/config.h and |
| 24 |
# configuring the build is a major legitimate use of macros. |
| 25 |
# |
| 26 |
# -cppcoreguidelines-narrowing-conversions, |
| 27 |
# -bugprone-narrowing-conversions |
| 28 |
# We have many cases where int is converted to float and we don't care |
| 29 |
# enough about such potential loss of precision to use explicit casts |
| 30 |
# in large numbers of places. |
| 31 |
# |
| 32 |
# -google-readability-avoid-underscore-in-googletest-name |
| 33 |
# We need to use underscores for readability for our legacy types |
| 34 |
# and command-line parameter names |
| 35 |
# |
| 36 |
# -misc-no-recursion |
| 37 |
# We have way too many functions and methods relying on recursion |
| 38 |
# |
| 39 |
# -readability-static-accessed-through-instance |
| 40 |
# Especially the GPU code uses this in many places. |
| 41 |
# |
| 42 |
# -performance-type-promotion-in-math-fn |
| 43 |
# Those warnings are in the gpu code and we shouldn't to worry about them. |
| 44 |
# |
| 45 |
# -performance-enum-size |
| 46 |
# We tend not to store a lot of enum values, so don't suffer much performance |
| 47 |
# penalty from this. |
| 48 |
# |
| 49 |
# -readability-identifier-length |
| 50 |
# We use a lot of single-character identifiers (e.g. loop variables) and some |
| 51 |
# others have domain significance (x, v, f, M, mu, phi, p, q) so we are never |
| 52 |
# going to want to do the work to conform with this |
| 53 |
# |
| 54 |
# -bugprone-assignment-in-if-condition |
| 55 |
# -bugprone-easily-swappable-parameters |
| 56 |
# -bugprone-empty-catch |
| 57 |
# -bugprone-implicit-widening-of-multiplication-result |
| 58 |
# -bugprone-multi-level-implicit-pointer-conversion |
| 59 |
# -bugprone-unchecked-optional-access |
| 60 |
# -bugprone-unsafe-functions |
| 61 |
# -bugprone-suspicious-memory-comparison |
| 62 |
# -bugprone-switch-missing-default-case |
| 63 |
# -bugprone-throw-keyword-missing |
| 64 |
# -bugprone-unused-return-value |
| 65 |
# -cppcoreguidelines-avoid-const-or-ref-data-members |
| 66 |
# -cppcoreguidelines-avoid-do-while |
| 67 |
# -cppcoreguidelines-macro-to-enum |
| 68 |
# -cppcoreguidelines-owning-memory |
| 69 |
# -cppcoreguidelines-prefer-member-initializer |
| 70 |
# -cppcoreguidelines-rvalue-reference-param-not-moved |
| 71 |
# -cppcoreguidelines-use-default-member-init |
| 72 |
# -google-readability-casting |
| 73 |
# -misc-header-include-cycle |
| 74 |
# -misc-include-cleaner |
| 75 |
# -misc-confusable-identifiers |
| 76 |
# -misc-const-correctness |
| 77 |
# -misc-use-anonymous-namespace |
| 78 |
# -modernize-use-emplace |
| 79 |
# -performance-avoid-endl |
| 80 |
# -performance-no-int-to-ptr |
| 81 |
# -readability-avoid-nested-conditional-operator |
| 82 |
# -readability-avoid-unconditional-preprocessor-if |
| 83 |
# -readability-cognitive-complexity |
| 84 |
# -readability-container-data-pointer |
| 85 |
# -readability-function-cognitive-complexity |
| 86 |
# -readability-make-member-function-const |
| 87 |
# -readability-non-const-parameter |
| 88 |
# -readability-redundant-casting |
| 89 |
# -readability-redundant-member-init |
| 90 |
# -readability-simplify-boolean-expr |
| 91 |
# -readability-static-definition-in-anonymous-namespace |
| 92 |
# -readability-suspicious-call-argument |
| 93 |
# -readability-uppercase-literal-suffix |
| 94 |
# Bulk suppressions while updating to clang-tidy-18. Hopefully we can relax |
| 95 |
# some of these later. |
| 96 |
Checks: clang-diagnostic-*,-clang-analyzer-*,-clang-analyzer-security.insecureAPI.strcpy, |
| 97 |
bugprone-*,misc-*,readability-*,performance-*,mpi-*, |
| 98 |
-readability-inconsistent-declaration-parameter-name, |
| 99 |
-readability-function-size,-readability-else-after-return, |
| 100 |
modernize-use-nullptr,modernize-use-emplace, |
| 101 |
modernize-make-unique,modernize-make-shared, |
| 102 |
modernize-avoid-bind, |
| 103 |
modernize-use-override, |
| 104 |
modernize-redundant-void-arg,modernize-use-bool-literals, |
| 105 |
cppcoreguidelines-*,-cppcoreguidelines-pro-*,-cppcoreguidelines-owning-memory, |
| 106 |
-cppcoreguidelines-no-malloc,-cppcoreguidelines-special-member-functions, |
| 107 |
-cppcoreguidelines-avoid-goto, |
| 108 |
google-*,-google-build-using-namespace,-google-explicit-constructor, |
| 109 |
-google-readability-function-size,-google-readability-todo,-google-runtime-int, |
| 110 |
-cppcoreguidelines-non-private-member-variables-in-classes, |
| 111 |
-misc-non-private-member-variables-in-classes, |
| 112 |
-readability-isolate-declaration, |
| 113 |
-cppcoreguidelines-avoid-c-arrays, |
| 114 |
-cppcoreguidelines-avoid-magic-numbers, |
| 115 |
-readability-magic-numbers, |
| 116 |
-cppcoreguidelines-macro-usage, |
| 117 |
-cppcoreguidelines-narrowing-conversions, |
| 118 |
-bugprone-narrowing-conversions, |
| 119 |
-google-readability-avoid-underscore-in-googletest-name, |
| 120 |
-cppcoreguidelines-init-variables, |
| 121 |
-misc-no-recursion, |
| 122 |
-readability-static-accessed-through-instance, |
| 123 |
-performance-type-promotion-in-math-fn, |
| 124 |
-performance-enum-size, |
| 125 |
-readability-identifier-length, |
| 126 |
-bugprone-assignment-in-if-condition, |
| 127 |
-bugprone-easily-swappable-parameters, |
| 128 |
-bugprone-empty-catch, |
| 129 |
-bugprone-implicit-widening-of-multiplication-result, |
| 130 |
-bugprone-multi-level-implicit-pointer-conversion, |
| 131 |
-bugprone-unchecked-optional-access, |
| 132 |
-bugprone-unsafe-functions, |
| 133 |
-bugprone-suspicious-memory-comparison, |
| 134 |
-bugprone-switch-missing-default-case, |
| 135 |
-bugprone-throw-keyword-missing, |
| 136 |
-bugprone-unused-return-value, |
| 137 |
-cppcoreguidelines-avoid-const-or-ref-data-members, |
| 138 |
-cppcoreguidelines-avoid-do-while, |
| 139 |
-cppcoreguidelines-macro-to-enum, |
| 140 |
-cppcoreguidelines-owning-memory, |
| 141 |
-cppcoreguidelines-prefer-member-initializer, |
| 142 |
-cppcoreguidelines-rvalue-reference-param-not-moved, |
| 143 |
-cppcoreguidelines-use-default-member-init, |
| 144 |
-google-readability-casting, |
| 145 |
-misc-header-include-cycle, |
| 146 |
-misc-include-cleaner, |
| 147 |
-misc-confusable-identifiers, |
| 148 |
-misc-const-correctness, |
| 149 |
-misc-use-anonymous-namespace, |
| 150 |
-modernize-use-emplace, |
| 151 |
-performance-avoid-endl, |
| 152 |
-performance-no-int-to-ptr, |
| 153 |
-readability-avoid-nested-conditional-operator, |
| 154 |
-readability-avoid-unconditional-preprocessor-if, |
| 155 |
-readability-cognitive-complexity, |
| 156 |
-readability-container-data-pointer, |
| 157 |
-readability-function-cognitive-complexity, |
| 158 |
-readability-make-member-function-const, |
| 159 |
-readability-non-const-parameter, |
| 160 |
-readability-redundant-casting, |
| 161 |
-readability-redundant-member-init, |
| 162 |
-readability-simplify-boolean-expr, |
| 163 |
-readability-static-definition-in-anonymous-namespace, |
| 164 |
-readability-suspicious-call-argument, |
| 165 |
-readability-uppercase-literal-suffix |
| 166 |
HeaderFilterRegex: .* |
| 167 |
CheckOptions: |
| 168 |
- key: cppcoreguidelines-special-member-functions.AllowSoleDefaultDtor |
| 169 |
value: 1 |
| 170 |
- key: modernize-make-unique.IncludeStyle |
| 171 |
value: google |
| 172 |
- key: modernize-make-shared.IncludeStyle |
| 173 |
value: google |
| 174 |
- key: readability-implicit-bool-conversion.AllowIntegerConditions |
| 175 |
value: 1 |
| 176 |
- key: readability-implicit-bool-conversion.AllowPointerConditions |
| 177 |
value: 1 |
| 178 |
- key: bugprone-dangling-handle.HandleClasses |
| 179 |
value: std::basic_string_view; nonstd::sv_lite::basic_string_view |
| 180 |
# Permit passing shard pointers by value for sink parameters |
| 181 |
- key: performance-unnecessary-copy-initialization.AllowedTypes |
| 182 |
value: shared_ptr |
| 183 |
- key: performance-unnecessary-value-param.AllowedTypes |
| 184 |
value: shared_ptr |