|
| 1 | +# Copyright 2025 The Android Open Source Project |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
| 15 | +FormatStyle: file |
| 16 | +InheritParentConfig: true |
| 17 | + |
| 18 | +# Please add checks explicitly rather than using wildcards like "modernize-*". |
| 19 | +# These check names are current as of LLVM 20.0.0, as reported by "clang-tidy --list-checks --checks=*" |
| 20 | +# For more information on each check, see https://clang.llvm.org/extra/clang-tidy/checks/list.html. |
| 21 | +Checks: |
| 22 | + # from android-* |
| 23 | + - android-cloexec-accept |
| 24 | + - android-cloexec-accept4 |
| 25 | + - android-cloexec-creat |
| 26 | + - android-cloexec-dup |
| 27 | + - android-cloexec-epoll-create |
| 28 | + - android-cloexec-epoll-create1 |
| 29 | + - android-cloexec-fopen |
| 30 | + - android-cloexec-inotify-init |
| 31 | + - android-cloexec-inotify-init1 |
| 32 | + - android-cloexec-memfd-create |
| 33 | + - android-cloexec-open |
| 34 | + - android-cloexec-pipe |
| 35 | + - android-cloexec-pipe2 |
| 36 | + - android-cloexec-socket |
| 37 | + - android-comparison-in-temp-failure-retry |
| 38 | + |
| 39 | + # from bugprone-* |
| 40 | + - bugprone-argument-comment |
| 41 | + - bugprone-assert-side-effect |
| 42 | + - bugprone-assignment-in-if-condition |
| 43 | + - bugprone-bad-signal-to-kill-thread |
| 44 | + - bugprone-bool-pointer-implicit-conversion |
| 45 | + - bugprone-branch-clone |
| 46 | + - bugprone-casting-through-void |
| 47 | + - bugprone-chained-comparison |
| 48 | + - bugprone-compare-pointer-to-member-virtual-function |
| 49 | + - bugprone-copy-constructor-init |
| 50 | + - bugprone-crtp-constructor-accessibility |
| 51 | + - bugprone-dangling-handle |
| 52 | + - bugprone-dynamic-static-initializers |
| 53 | + - bugprone-easily-swappable-parameters |
| 54 | + - bugprone-empty-catch |
| 55 | + - bugprone-exception-escape |
| 56 | + - bugprone-fold-init-type |
| 57 | + - bugprone-forward-declaration-namespace |
| 58 | + - bugprone-forwarding-reference-overload |
| 59 | + - bugprone-implicit-widening-of-multiplication-result |
| 60 | + - bugprone-inaccurate-erase |
| 61 | + - bugprone-inc-dec-in-conditions |
| 62 | + - bugprone-incorrect-enable-if |
| 63 | + - bugprone-incorrect-roundings |
| 64 | + - bugprone-infinite-loop |
| 65 | + - bugprone-integer-division |
| 66 | + - bugprone-lambda-function-name |
| 67 | + - bugprone-macro-parentheses |
| 68 | + - bugprone-macro-repeated-side-effects |
| 69 | + - bugprone-misplaced-operator-in-strlen-in-alloc |
| 70 | + - bugprone-misplaced-pointer-arithmetic-in-alloc |
| 71 | + - bugprone-misplaced-widening-cast |
| 72 | + - bugprone-move-forwarding-reference |
| 73 | + - bugprone-multi-level-implicit-pointer-conversion |
| 74 | + - bugprone-multiple-new-in-one-expression |
| 75 | + - bugprone-multiple-statement-macro |
| 76 | + - bugprone-narrowing-conversions |
| 77 | + - bugprone-no-escape |
| 78 | + - bugprone-non-zero-enum-to-bool-conversion |
| 79 | + - bugprone-not-null-terminated-result |
| 80 | + - bugprone-optional-value-conversion |
| 81 | + - bugprone-parent-virtual-call |
| 82 | + - bugprone-pointer-arithmetic-on-polymorphic-object |
| 83 | + - bugprone-posix-return |
| 84 | + - bugprone-redundant-branch-condition |
| 85 | + - bugprone-reserved-identifier |
| 86 | + - bugprone-return-const-ref-from-parameter |
| 87 | + - bugprone-shared-ptr-array-mismatch |
| 88 | + - bugprone-signal-handler |
| 89 | + - bugprone-signed-char-misuse |
| 90 | + - bugprone-sizeof-container |
| 91 | + - bugprone-sizeof-expression |
| 92 | + - bugprone-spuriously-wake-up-functions |
| 93 | + - bugprone-standalone-empty |
| 94 | + - bugprone-string-constructor |
| 95 | + - bugprone-string-integer-assignment |
| 96 | + - bugprone-string-literal-with-embedded-nul |
| 97 | + - bugprone-stringview-nullptr |
| 98 | + - bugprone-suspicious-enum-usage |
| 99 | + - bugprone-suspicious-include |
| 100 | + - bugprone-suspicious-memory-comparison |
| 101 | + - bugprone-suspicious-memset-usage |
| 102 | + - bugprone-suspicious-missing-comma |
| 103 | + - bugprone-suspicious-realloc-usage |
| 104 | + - bugprone-suspicious-semicolon |
| 105 | + - bugprone-suspicious-string-compare |
| 106 | + - bugprone-suspicious-stringview-data-usage |
| 107 | + - bugprone-swapped-arguments |
| 108 | + - bugprone-switch-missing-default-case |
| 109 | + - bugprone-terminating-continue |
| 110 | + - bugprone-throw-keyword-missing |
| 111 | + - bugprone-too-small-loop-variable |
| 112 | + - bugprone-unchecked-optional-access |
| 113 | + - bugprone-undefined-memory-manipulation |
| 114 | + - bugprone-undelegated-constructor |
| 115 | + - bugprone-unhandled-exception-at-new |
| 116 | + - bugprone-unhandled-self-assignment |
| 117 | + - bugprone-unique-ptr-array-mismatch |
| 118 | + - bugprone-unsafe-functions |
| 119 | + - bugprone-unused-local-non-trivial-variable |
| 120 | + - bugprone-unused-raii |
| 121 | + - bugprone-unused-return-value |
| 122 | + - bugprone-use-after-move |
| 123 | + - bugprone-virtual-near-miss |
| 124 | + |
| 125 | + # from cert-* |
| 126 | + - cert-con36-c |
| 127 | + - cert-con54-cpp |
| 128 | + - cert-ctr56-cpp |
| 129 | + - cert-dcl03-c |
| 130 | + - cert-dcl16-c |
| 131 | + - cert-dcl37-c |
| 132 | + - cert-dcl50-cpp |
| 133 | + - cert-dcl51-cpp |
| 134 | + - cert-dcl54-cpp |
| 135 | + - cert-dcl58-cpp |
| 136 | + - cert-dcl59-cpp |
| 137 | + - cert-env33-c |
| 138 | + - cert-err09-cpp |
| 139 | + - cert-err33-c |
| 140 | + - cert-err34-c |
| 141 | + - cert-err52-cpp |
| 142 | + - cert-err58-cpp |
| 143 | + - cert-err60-cpp |
| 144 | + - cert-err61-cpp |
| 145 | + - cert-exp42-c |
| 146 | + - cert-fio38-c |
| 147 | + - cert-flp30-c |
| 148 | + - cert-flp37-c |
| 149 | + - cert-int09-c |
| 150 | + - cert-mem57-cpp |
| 151 | + - cert-msc24-c |
| 152 | + - cert-msc30-c |
| 153 | + - cert-msc32-c |
| 154 | + - cert-msc33-c |
| 155 | + - cert-msc50-cpp |
| 156 | + - cert-msc51-cpp |
| 157 | + - cert-msc54-cpp |
| 158 | + - cert-oop11-cpp |
| 159 | + - cert-oop54-cpp |
| 160 | + - cert-oop57-cpp |
| 161 | + - cert-oop58-cpp |
| 162 | + - cert-pos44-c |
| 163 | + - cert-pos47-c |
| 164 | + - cert-sig30-c |
| 165 | + - cert-str34-c |
| 166 | + |
| 167 | + # from concurrency-* |
| 168 | + - concurrency-mt-unsafe |
| 169 | + - concurrency-thread-canceltype-asynchronous |
| 170 | + |
| 171 | + # from cppcoreguidelines-* |
| 172 | + - cppcoreguidelines-avoid-c-arrays |
| 173 | + - cppcoreguidelines-avoid-capturing-lambda-coroutines |
| 174 | + - cppcoreguidelines-avoid-const-or-ref-data-members |
| 175 | + - cppcoreguidelines-avoid-do-while |
| 176 | + - cppcoreguidelines-avoid-goto |
| 177 | + - cppcoreguidelines-avoid-magic-numbers |
| 178 | + - cppcoreguidelines-avoid-non-const-global-variables |
| 179 | + - cppcoreguidelines-avoid-reference-coroutine-parameters |
| 180 | + - cppcoreguidelines-c-copy-assignment-signature |
| 181 | + - cppcoreguidelines-explicit-virtual-functions |
| 182 | + - cppcoreguidelines-init-variables |
| 183 | + - cppcoreguidelines-interfaces-global-init |
| 184 | + - cppcoreguidelines-macro-to-enum |
| 185 | + - cppcoreguidelines-macro-usage |
| 186 | + - cppcoreguidelines-misleading-capture-default-by-value |
| 187 | + - cppcoreguidelines-missing-std-forward |
| 188 | + - cppcoreguidelines-narrowing-conversions |
| 189 | + - cppcoreguidelines-no-malloc |
| 190 | + - cppcoreguidelines-no-suspend-with-lock |
| 191 | + - cppcoreguidelines-noexcept-destructor |
| 192 | + - cppcoreguidelines-noexcept-move-operations |
| 193 | + - cppcoreguidelines-noexcept-swap |
| 194 | + - cppcoreguidelines-non-private-member-variables-in-classes |
| 195 | + - cppcoreguidelines-owning-memory |
| 196 | + - cppcoreguidelines-prefer-member-initializer |
| 197 | + - cppcoreguidelines-pro-bounds-array-to-pointer-decay |
| 198 | + - cppcoreguidelines-pro-bounds-constant-array-index |
| 199 | + - cppcoreguidelines-pro-bounds-pointer-arithmetic |
| 200 | + - cppcoreguidelines-pro-type-const-cast |
| 201 | + - cppcoreguidelines-pro-type-cstyle-cast |
| 202 | + - cppcoreguidelines-pro-type-member-init |
| 203 | + - cppcoreguidelines-pro-type-reinterpret-cast |
| 204 | + - cppcoreguidelines-pro-type-static-cast-downcast |
| 205 | + - cppcoreguidelines-pro-type-union-access |
| 206 | + - cppcoreguidelines-pro-type-vararg |
| 207 | + - cppcoreguidelines-rvalue-reference-param-not-moved |
| 208 | + - cppcoreguidelines-slicing |
| 209 | + - cppcoreguidelines-special-member-functions |
| 210 | + - cppcoreguidelines-use-default-member-init |
| 211 | + - cppcoreguidelines-virtual-class-destructor |
| 212 | + |
| 213 | + # from google-* |
| 214 | + - google-build-explicit-make-pair |
| 215 | + - google-build-namespaces |
| 216 | + - google-build-using-namespace |
| 217 | + - google-default-arguments |
| 218 | + - google-explicit-constructor |
| 219 | + - google-global-names-in-headers |
| 220 | + - google-objc-avoid-nsobject-new |
| 221 | + - google-objc-avoid-throwing-exception |
| 222 | + - google-objc-function-naming |
| 223 | + - google-objc-global-variable-declaration |
| 224 | + - google-readability-avoid-underscore-in-googletest-name |
| 225 | + - google-readability-braces-around-statements |
| 226 | + - google-readability-casting |
| 227 | + - google-readability-function-size |
| 228 | + - google-readability-namespace-comments |
| 229 | + - google-readability-todo |
| 230 | + - google-runtime-int |
| 231 | + - google-runtime-operator |
| 232 | + - google-upgrade-googletest-case |
| 233 | + |
| 234 | + # from misc-* |
| 235 | + - misc-confusable-identifiers |
| 236 | + - misc-const-correctness |
| 237 | + - misc-coroutine-hostile-raii |
| 238 | + - misc-definitions-in-headers |
| 239 | + - misc-header-include-cycle |
| 240 | + - misc-include-cleaner |
| 241 | + - misc-misleading-bidirectional |
| 242 | + - misc-misleading-identifier |
| 243 | + - misc-misplaced-const |
| 244 | + - misc-new-delete-overloads |
| 245 | + - misc-no-recursion |
| 246 | + - misc-non-copyable-objects |
| 247 | + - misc-non-private-member-variables-in-classes |
| 248 | + - misc-redundant-expression |
| 249 | + - misc-static-assert |
| 250 | + - misc-throw-by-value-catch-by-reference |
| 251 | + - misc-unconventional-assign-operator |
| 252 | + - misc-uniqueptr-reset-release |
| 253 | + - misc-unused-alias-decls |
| 254 | + - misc-unused-parameters |
| 255 | + - misc-unused-using-decls |
| 256 | + - misc-use-anonymous-namespace |
| 257 | + - misc-use-internal-linkage |
| 258 | + |
| 259 | + # from modernize-* |
| 260 | + - modernize-avoid-bind |
| 261 | + - modernize-avoid-c-arrays |
| 262 | + - modernize-concat-nested-namespaces |
| 263 | + - modernize-deprecated-headers |
| 264 | + - modernize-deprecated-ios-base-aliases |
| 265 | + - modernize-loop-convert |
| 266 | + - modernize-macro-to-enum |
| 267 | + - modernize-make-shared |
| 268 | + - modernize-make-unique |
| 269 | + - modernize-min-max-use-initializer-list |
| 270 | + - modernize-pass-by-value |
| 271 | + - modernize-raw-string-literal |
| 272 | + - modernize-redundant-void-arg |
| 273 | + - modernize-replace-auto-ptr |
| 274 | + - modernize-replace-disallow-copy-and-assign-macro |
| 275 | + - modernize-replace-random-shuffle |
| 276 | + - modernize-return-braced-init-list |
| 277 | + - modernize-shrink-to-fit |
| 278 | + - modernize-type-traits |
| 279 | + - modernize-unary-static-assert |
| 280 | + - modernize-use-auto |
| 281 | + - modernize-use-bool-literals |
| 282 | + - modernize-use-constraints |
| 283 | + - modernize-use-default-member-init |
| 284 | + - modernize-use-designated-initializers |
| 285 | + - modernize-use-emplace |
| 286 | + - modernize-use-equals-default |
| 287 | + - modernize-use-equals-delete |
| 288 | + - modernize-use-nodiscard |
| 289 | + - modernize-use-noexcept |
| 290 | + - modernize-use-nullptr |
| 291 | + - modernize-use-override |
| 292 | + - modernize-use-ranges |
| 293 | + - modernize-use-starts-ends-with |
| 294 | + - modernize-use-std-format |
| 295 | + - modernize-use-std-numbers |
| 296 | + - modernize-use-std-print |
| 297 | + - modernize-use-trailing-return-type |
| 298 | + - modernize-use-transparent-functors |
| 299 | + - modernize-use-uncaught-exceptions |
| 300 | + - modernize-use-using |
| 301 | + |
| 302 | + # from performance-* |
| 303 | + - performance-avoid-endl |
| 304 | + - performance-enum-size |
| 305 | + - performance-faster-string-find |
| 306 | + - performance-for-range-copy |
| 307 | + - performance-implicit-conversion-in-loop |
| 308 | + - performance-inefficient-algorithm |
| 309 | + - performance-inefficient-string-concatenation |
| 310 | + - performance-inefficient-vector-operation |
| 311 | + - performance-move-const-arg |
| 312 | + - performance-move-constructor-init |
| 313 | + - performance-no-automatic-move |
| 314 | + - performance-no-int-to-ptr |
| 315 | + - performance-noexcept-destructor |
| 316 | + - performance-noexcept-move-constructor |
| 317 | + - performance-noexcept-swap |
| 318 | + - performance-trivially-destructible |
| 319 | + - performance-type-promotion-in-math-fn |
| 320 | + - performance-unnecessary-copy-initialization |
| 321 | + - performance-unnecessary-value-param |
| 322 | + |
| 323 | + # from portability-* |
| 324 | + - portability-restrict-system-includes |
| 325 | + - portability-simd-intrinsics |
| 326 | + - portability-std-allocator-const |
| 327 | + |
| 328 | + # from readability-* |
| 329 | + - readability-avoid-const-params-in-decls |
| 330 | + - readability-avoid-nested-conditional-operator |
| 331 | + - readability-avoid-return-with-void-value |
| 332 | + - readability-avoid-unconditional-preprocessor-if |
| 333 | + - readability-braces-around-statements |
| 334 | + - readability-const-return-type |
| 335 | + - readability-container-contains |
| 336 | + - readability-container-data-pointer |
| 337 | + - readability-container-size-empty |
| 338 | + - readability-convert-member-functions-to-static |
| 339 | + - readability-delete-null-pointer |
| 340 | + - readability-duplicate-include |
| 341 | + - readability-else-after-return |
| 342 | + - readability-enum-initial-value |
| 343 | + - readability-function-cognitive-complexity |
| 344 | + - readability-function-size |
| 345 | + - readability-identifier-length |
| 346 | + - readability-identifier-naming |
| 347 | + - readability-implicit-bool-conversion |
| 348 | + - readability-inconsistent-declaration-parameter-name |
| 349 | + - readability-isolate-declaration |
| 350 | + - readability-magic-numbers |
| 351 | + - readability-make-member-function-const |
| 352 | + - readability-math-missing-parentheses |
| 353 | + - readability-misleading-indentation |
| 354 | + - readability-misplaced-array-index |
| 355 | + - readability-named-parameter |
| 356 | + - readability-non-const-parameter |
| 357 | + - readability-operators-representation |
| 358 | + - readability-qualified-auto |
| 359 | + - readability-redundant-access-specifiers |
| 360 | + - readability-redundant-casting |
| 361 | + - readability-redundant-control-flow |
| 362 | + - readability-redundant-declaration |
| 363 | + - readability-redundant-function-ptr-dereference |
| 364 | + - readability-redundant-inline-specifier |
| 365 | + - readability-redundant-member-init |
| 366 | + - readability-redundant-preprocessor |
| 367 | + - readability-redundant-smartptr-get |
| 368 | + - readability-redundant-string-cstr |
| 369 | + - readability-redundant-string-init |
| 370 | + - readability-reference-to-constructed-temporary |
| 371 | + - readability-simplify-boolean-expr |
| 372 | + - readability-simplify-subscript-expr |
| 373 | + - readability-static-accessed-through-instance |
| 374 | + - readability-static-definition-in-anonymous-namespace |
| 375 | + - readability-string-compare |
| 376 | + - readability-suspicious-call-argument |
| 377 | + - readability-uniqueptr-delete-release |
| 378 | + - readability-uppercase-literal-suffix |
| 379 | + - readability-use-anyofallof |
| 380 | + - readability-use-std-min-max |
0 commit comments