xref: /openbmc/libcper/.clang-tidy (revision 66219857)
1Checks: '
2-*,
3bugprone-argument-comment,
4bugprone-assert-side-effect,
5bugprone-bad-signal-to-kill-thread,
6bugprone-bool-pointer-implicit-conversion,
7bugprone-branch-clone,
8bugprone-dangling-handle,
9bugprone-dynamic-static-initializers,
10bugprone-fold-init-type,
11#bugprone-implicit-widening-of-multiplication-result,
12bugprone-inaccurate-erase,
13bugprone-incorrect-roundings,
14bugprone-infinite-loop,
15bugprone-integer-division,
16bugprone-macro-parentheses,
17bugprone-macro-repeated-side-effects,
18bugprone-misplaced-operator-in-strlen-in-alloc,
19bugprone-misplaced-pointer-arithmetic-in-alloc,
20bugprone-misplaced-widening-cast,
21bugprone-multiple-statement-macro,
22#bugprone-narrowing-conversions,
23bugprone-no-escape,
24bugprone-not-null-terminated-result,
25bugprone-posix-return,
26bugprone-redundant-branch-condition,
27bugprone-reserved-identifier,
28bugprone-signal-handler,
29bugprone-signed-char-misuse,
30bugprone-sizeof-container,
31bugprone-sizeof-expression,
32bugprone-spuriously-wake-up-functions,
33bugprone-string-constructor,
34bugprone-string-integer-assignment,
35bugprone-string-literal-with-embedded-nul,
36bugprone-suspicious-enum-usage,
37bugprone-suspicious-include,
38bugprone-suspicious-memset-usage,
39bugprone-suspicious-missing-comma,
40bugprone-suspicious-semicolon,
41bugprone-suspicious-string-compare,
42bugprone-swapped-arguments,
43bugprone-terminating-continue,
44bugprone-too-small-loop-variable,
45bugprone-undefined-memory-manipulation,
46bugprone-unhandled-self-assignment,
47bugprone-unused-return-value,
48cert-con36-c,
49cert-con54-cpp,
50cert-dcl03-c,
51cert-dcl16-c,
52cert-dcl21-cpp,
53cert-dcl37-c,
54cert-dcl50-cpp,
55cert-dcl51-cpp,
56cert-dcl54-cpp,
57cert-dcl58-cpp,
58cert-dcl59-cpp,
59cert-env33-c,
60cert-err09-cpp,
61#cert-err34-c,
62cert-err52-cpp,
63cert-err60-cpp,
64cert-err61-cpp,
65cert-fio38-c,
66cert-flp30-c,
67cert-mem57-cpp,
68#cert-msc30-c,
69#cert-msc32-c,
70#cert-msc50-cpp,
71#cert-msc51-cpp,
72cert-oop11-cpp,
73cert-oop54-cpp,
74cert-oop57-cpp,
75cert-oop58-cpp,
76cert-pos44-c,
77cert-pos47-c,
78cert-sig30-c,
79cert-str34-c,
80clang-analyzer-apiModeling.TrustNonnull,
81clang-analyzer-apiModeling.google.GTest,
82clang-analyzer-apiModeling.llvm.CastValue,
83clang-analyzer-apiModeling.llvm.ReturnValue,
84clang-analyzer-core.CallAndMessage,
85clang-analyzer-core.CallAndMessageModeling,
86clang-analyzer-core.DivideZero,
87clang-analyzer-core.DynamicTypePropagation,
88clang-analyzer-core.NonNullParamChecker,
89clang-analyzer-core.NonnilStringConstants,
90clang-analyzer-core.NullDereference,
91clang-analyzer-core.StackAddrEscapeBase,
92clang-analyzer-core.StackAddressEscape,
93clang-analyzer-core.UndefinedBinaryOperatorResult,
94clang-analyzer-core.VLASize,
95clang-analyzer-core.builtin.BuiltinFunctions,
96clang-analyzer-core.builtin.NoReturnFunctions,
97clang-analyzer-core.uninitialized.ArraySubscript,
98clang-analyzer-core.uninitialized.Assign,
99clang-analyzer-core.uninitialized.Branch,
100clang-analyzer-core.uninitialized.CapturedBlockVariable,
101clang-analyzer-core.uninitialized.UndefReturn,
102clang-analyzer-deadcode.DeadStores,
103clang-analyzer-nullability.NullPassedToNonnull,
104clang-analyzer-nullability.NullReturnedFromNonnull,
105clang-analyzer-nullability.NullabilityBase,
106clang-analyzer-nullability.NullableDereferenced,
107clang-analyzer-nullability.NullablePassedToNonnull,
108clang-analyzer-nullability.NullableReturnedFromNonnull,
109clang-analyzer-optin.mpi.MPI-Checker,
110clang-analyzer-optin.performance.GCDAntipattern,
111clang-analyzer-optin.performance.Padding,
112clang-analyzer-optin.portability.UnixAPI,
113clang-analyzer-security.FloatLoopCounter,
114clang-analyzer-security.insecureAPI.SecuritySyntaxChecker,
115clang-analyzer-security.insecureAPI.UncheckedReturn,
116clang-analyzer-security.insecureAPI.bcmp,
117clang-analyzer-security.insecureAPI.bcopy,
118clang-analyzer-security.insecureAPI.bzero,
119clang-analyzer-security.insecureAPI.decodeValueOfObjCType,
120clang-analyzer-security.insecureAPI.getpw,
121clang-analyzer-security.insecureAPI.gets,
122clang-analyzer-security.insecureAPI.mkstemp,
123clang-analyzer-security.insecureAPI.mktemp,
124clang-analyzer-security.insecureAPI.rand,
125#clang-analyzer-security.insecureAPI.strcpy,
126clang-analyzer-security.insecureAPI.vfork,
127clang-analyzer-unix.API,
128clang-analyzer-unix.DynamicMemoryModeling,
129clang-analyzer-unix.Malloc,
130clang-analyzer-unix.MallocSizeof,
131clang-analyzer-unix.MismatchedDeallocator,
132clang-analyzer-unix.Vfork,
133clang-analyzer-unix.cstring.BadSizeArg,
134clang-analyzer-unix.cstring.CStringModeling,
135clang-analyzer-unix.cstring.NullArg,
136clang-analyzer-valist.CopyToSelf,
137clang-analyzer-valist.Uninitialized,
138clang-analyzer-valist.Unterminated,
139clang-analyzer-valist.ValistBase,
140clang-analyzer-webkit.NoUncountedMemberChecker,
141clang-analyzer-webkit.RefCntblBaseVirtualDtor,
142misc-misplaced-const,
143misc-redundant-expression,
144misc-static-assert,
145misc-throw-by-value-catch-by-reference,
146misc-unconventional-assign-operator,
147misc-uniqueptr-reset-release,
148misc-unused-using-decls,
149modernize-avoid-bind,
150modernize-deprecated-headers,
151modernize-deprecated-ios-base-aliases,
152modernize-loop-convert,
153modernize-make-shared,
154modernize-make-unique,
155modernize-raw-string-literal,
156modernize-replace-auto-ptr,
157modernize-replace-random-shuffle,
158modernize-return-braced-init-list,
159modernize-shrink-to-fit,
160modernize-unary-static-assert,
161modernize-use-bool-literals,
162modernize-use-transparent-functors,
163modernize-use-uncaught-exceptions,
164performance-faster-string-find,
165performance-for-range-copy,
166performance-implicit-conversion-in-loop,
167performance-inefficient-algorithm,
168performance-inefficient-string-concatenation,
169performance-inefficient-vector-operation,
170performance-no-int-to-ptr,
171performance-type-promotion-in-math-fn,
172performance-unnecessary-copy-initialization,
173performance-unnecessary-value-param,
174readability-avoid-const-params-in-decls,
175readability-braces-around-statements,
176readability-const-return-type,
177readability-container-size-empty,
178readability-convert-member-functions-to-static,
179readability-delete-null-pointer,
180readability-deleted-default,
181readability-else-after-return,
182readability-function-size,
183-readability-identifier-naming,
184readability-inconsistent-declaration-parameter-name,
185readability-isolate-declaration,
186readability-make-member-function-const,
187readability-misleading-indentation,
188readability-misplaced-array-index,
189readability-named-parameter,
190readability-non-const-parameter,
191-readability-qualified-auto,
192readability-redundant-access-specifiers,
193readability-redundant-control-flow,
194readability-redundant-declaration,
195readability-redundant-function-ptr-dereference,
196readability-redundant-member-init,
197readability-redundant-preprocessor,
198readability-redundant-smartptr-get,
199readability-redundant-string-cstr,
200readability-redundant-string-init,
201readability-simplify-boolean-expr,
202readability-simplify-subscript-expr,
203readability-static-accessed-through-instance,
204readability-static-definition-in-anonymous-namespace,
205readability-string-compare,
206readability-suspicious-call-argument,
207'
208
209ExtraArgs:
210  - -Wno-unknown-pragmas  # TODO: remove this after switch to clang-tidy-18
211
212WarningsAsErrors: '*'
213HeaderFilterRegex: '(libcper)|(src)/'
214CheckOptions:
215  - { key: readability-identifier-naming.VariableCase,  value: lower_case }
216  - { key: readability-identifier-naming.FunctionCase,  value: lower_case }
217  - { key: readability-identifier-naming.ParameterCase, value: lower_case }
218  - { key: readability-identifier-naming.NamespaceCase, value: lower_case }
219  - { key: readability-identifier-naming.StructCase,    value: lower_case  }
220  - { key: cppcoreguidelines-macro-usage.AllowedRegexp, value: DEBUG*|NLOHMANN_JSON_SERIALIZE_ENUM }
221