|
1 | 1 | --- |
2 | | -Checks: "*, |
3 | | - -abseil-*, |
4 | | - -altera-*, |
5 | | - -android-*, |
6 | | - -fuchsia-*, |
7 | | - -google-*, |
8 | | - -llvm*, |
9 | | - -modernize-use-trailing-return-type, |
10 | | - -zircon-*, |
11 | | - -readability-else-after-return, |
12 | | - -readability-static-accessed-through-instance, |
13 | | - -readability-avoid-const-params-in-decls, |
14 | | - -cppcoreguidelines-non-private-member-variables-in-classes, |
15 | | - -misc-non-private-member-variables-in-classes, |
16 | | -" |
17 | | -HeaderFilterRegex: '' |
18 | | -FormatStyle: none |
| 2 | +# Enable a curated set of check families relevant to a modern C++20 project. |
| 3 | +# Platform/framework-specific groups (abseil, altera, android, fuchsia, |
| 4 | +# google, llvm, zircon) are excluded entirely. |
| 5 | +Checks: > |
| 6 | + bugprone-*, |
| 7 | + cert-*, |
| 8 | + clang-analyzer-*, |
| 9 | + concurrency-*, |
| 10 | + cppcoreguidelines-*, |
| 11 | + misc-*, |
| 12 | + modernize-*, |
| 13 | + performance-*, |
| 14 | + portability-*, |
| 15 | + readability-*, |
| 16 | + -abseil-*, |
| 17 | + -altera-*, |
| 18 | + -android-*, |
| 19 | + -fuchsia-*, |
| 20 | + -google-*, |
| 21 | + -llvm-*, |
| 22 | + -llvmlibc-*, |
| 23 | + -zircon-*, |
| 24 | + -hicpp-*, |
| 25 | + -modernize-use-trailing-return-type, |
| 26 | + -readability-else-after-return, |
| 27 | + -readability-static-accessed-through-instance, |
| 28 | + -readability-avoid-const-params-in-decls, |
| 29 | + -cppcoreguidelines-non-private-member-variables-in-classes, |
| 30 | + -misc-non-private-member-variables-in-classes, |
| 31 | + -readability-magic-numbers, |
| 32 | + -cppcoreguidelines-avoid-magic-numbers, |
| 33 | + -cert-err58-cpp, |
| 34 | + -cppcoreguidelines-pro-bounds-array-to-pointer-decay, |
| 35 | + -cppcoreguidelines-pro-type-vararg, |
| 36 | + -misc-include-cleaner, |
| 37 | +
|
| 38 | +# Only analyse headers that belong to this project; ignore installed/conan deps. |
| 39 | +HeaderFilterRegex: '(src|test|fuzz_test)/.*' |
| 40 | + |
| 41 | +# Treat every clang-tidy warning as an error (mirrors WARNINGS_AS_ERRORS). |
| 42 | +WarningsAsErrors: '*' |
| 43 | + |
| 44 | +# Pick up the project .clang-format when applying fixes. |
| 45 | +FormatStyle: file |
| 46 | + |
| 47 | +CheckOptions: |
| 48 | + # ---------- naming conventions (mirrors the project style) ---------- |
| 49 | + - key: readability-identifier-naming.ClassCase |
| 50 | + value: CamelCase |
| 51 | + - key: readability-identifier-naming.StructCase |
| 52 | + value: CamelCase |
| 53 | + - key: readability-identifier-naming.EnumCase |
| 54 | + value: CamelCase |
| 55 | + - key: readability-identifier-naming.EnumConstantCase |
| 56 | + value: CamelCase |
| 57 | + - key: readability-identifier-naming.FunctionCase |
| 58 | + value: camelBack |
| 59 | + - key: readability-identifier-naming.MethodCase |
| 60 | + value: camelBack |
| 61 | + - key: readability-identifier-naming.MemberCase |
| 62 | + value: camelBack |
| 63 | + - key: readability-identifier-naming.PrivateMemberCase |
| 64 | + value: camelBack |
| 65 | + - key: readability-identifier-naming.PrivateMemberPrefix |
| 66 | + value: 'm_' |
| 67 | + - key: readability-identifier-naming.ParameterCase |
| 68 | + value: camelBack |
| 69 | + - key: readability-identifier-naming.LocalVariableCase |
| 70 | + value: camelBack |
| 71 | + - key: readability-identifier-naming.VariableCase |
| 72 | + value: camelBack |
| 73 | + - key: readability-identifier-naming.GlobalConstantCase |
| 74 | + value: UPPER_CASE |
| 75 | + - key: readability-identifier-naming.ConstexprVariableCase |
| 76 | + value: UPPER_CASE |
| 77 | + - key: readability-identifier-naming.NamespaceCase |
| 78 | + value: lower_case |
| 79 | + - key: readability-identifier-naming.TypeAliasCase |
| 80 | + value: CamelCase |
| 81 | + # ---------- thresholds ---------- |
| 82 | + - key: readability-function-cognitive-complexity.Threshold |
| 83 | + value: '30' |
| 84 | + - key: readability-function-size.LineThreshold |
| 85 | + value: '80' |
| 86 | + - key: readability-function-size.StatementThreshold |
| 87 | + value: '50' |
| 88 | + - key: bugprone-easily-swappable-parameters.MinimumLength |
| 89 | + value: '3' |
| 90 | + - key: cppcoreguidelines-special-member-functions.AllowSoleDefaultDtor |
| 91 | + value: 'true' |
| 92 | + - key: cppcoreguidelines-special-member-functions.AllowMissingMoveFunctionsWhenCopyIsDeleted |
| 93 | + value: 'true' |
| 94 | + - key: modernize-use-default-member-init.UseAssignment |
| 95 | + value: 'false' |
| 96 | + - key: performance-unnecessary-value-param.AllowedTypes |
| 97 | + value: '' |
0 commit comments