xref: /openbmc/bmcweb/.clang-tidy (revision d8ef9915)
1Checks: '
2-*,
3bugprone-argument-comment,
4bugprone-assert-side-effect,
5bugprone-bad-signal-to-kill-thread,
6bugprone-bool-pointer-implicit-conversion,
7bugprone-branch-clone,
8bugprone-copy-constructor-init,
9bugprone-dangling-handle,
10bugprone-dynamic-static-initializers,
11bugprone-fold-init-type,
12bugprone-forward-declaration-namespace,
13bugprone-forwarding-reference-overload,
14bugprone-inaccurate-erase,
15bugprone-incorrect-roundings,
16bugprone-infinite-loop,
17bugprone-integer-division,
18bugprone-lambda-function-name,
19bugprone-macro-parentheses,
20bugprone-macro-repeated-side-effects,
21bugprone-misplaced-operator-in-strlen-in-alloc,
22bugprone-misplaced-pointer-arithmetic-in-alloc,
23bugprone-misplaced-widening-cast,
24bugprone-multiple-statement-macro,
25bugprone-narrowing-conversions,
26bugprone-no-escape,
27bugprone-not-null-terminated-result,
28bugprone-parent-virtual-call,
29bugprone-posix-return,
30bugprone-reserved-identifier,
31bugprone-signed-char-misuse,
32bugprone-sizeof-container,
33bugprone-sizeof-expression,
34bugprone-spuriously-wake-up-functions,
35bugprone-string-constructor,
36bugprone-string-integer-assignment,
37bugprone-string-literal-with-embedded-nul,
38bugprone-suspicious-enum-usage,
39#bugprone-suspicious-include,
40bugprone-suspicious-memset-usage,
41bugprone-suspicious-missing-comma,
42bugprone-suspicious-semicolon,
43bugprone-suspicious-string-compare,
44bugprone-swapped-arguments,
45bugprone-terminating-continue,
46bugprone-throw-keyword-missing,
47bugprone-too-small-loop-variable,
48bugprone-undefined-memory-manipulation,
49bugprone-undelegated-constructor,
50bugprone-unhandled-self-assignment,
51bugprone-unused-raii,
52bugprone-unused-return-value,
53bugprone-use-after-move,
54bugprone-virtual-near-miss,
55cert-con36-c,
56cert-con54-cpp,
57cert-dcl03-c,
58cert-dcl16-c,
59cert-dcl21-cpp,
60cert-dcl37-c,
61cert-dcl50-cpp,
62cert-dcl51-cpp,
63cert-dcl54-cpp,
64cert-dcl58-cpp,
65cert-dcl59-cpp,
66cert-env33-c,
67cert-err09-cpp,
68cert-err34-c,
69cert-err52-cpp,
70cert-err60-cpp,
71cert-err61-cpp,
72cert-fio38-c,
73cert-flp30-c,
74cert-mem57-cpp,
75cert-msc30-c,
76cert-msc32-c,
77cert-msc50-cpp,
78cert-msc51-cpp,
79cert-oop11-cpp,
80cert-oop54-cpp,
81cert-oop57-cpp,
82clang-analyzer-apiModeling.StdCLibraryFunctions,
83clang-analyzer-apiModeling.TrustNonnull,
84clang-analyzer-apiModeling.google.GTest,
85clang-analyzer-apiModeling.llvm.CastValue,
86clang-analyzer-apiModeling.llvm.ReturnValue,
87clang-analyzer-core.CallAndMessage,
88clang-analyzer-core.CallAndMessageModeling,
89clang-analyzer-core.DivideZero,
90clang-analyzer-core.DynamicTypePropagation,
91clang-analyzer-core.NonNullParamChecker,
92clang-analyzer-core.NonnilStringConstants,
93clang-analyzer-core.NullDereference,
94clang-analyzer-core.StackAddrEscapeBase,
95clang-analyzer-core.StackAddressEscape,
96clang-analyzer-core.UndefinedBinaryOperatorResult,
97clang-analyzer-core.VLASize,
98clang-analyzer-core.builtin.BuiltinFunctions,
99clang-analyzer-core.builtin.NoReturnFunctions,
100clang-analyzer-core.uninitialized.ArraySubscript,
101clang-analyzer-core.uninitialized.Assign,
102clang-analyzer-core.uninitialized.Branch,
103clang-analyzer-core.uninitialized.CapturedBlockVariable,
104clang-analyzer-core.uninitialized.UndefReturn,
105clang-analyzer-cplusplus.InnerPointer,
106clang-analyzer-cplusplus.Move,
107clang-analyzer-cplusplus.NewDelete,
108clang-analyzer-cplusplus.NewDeleteLeaks,
109clang-analyzer-cplusplus.PlacementNew,
110clang-analyzer-cplusplus.PureVirtualCall,
111clang-analyzer-cplusplus.SelfAssignment,
112clang-analyzer-cplusplus.SmartPtrModeling,
113clang-analyzer-cplusplus.VirtualCallModeling,
114clang-analyzer-deadcode.DeadStores,
115clang-analyzer-fuchsia.HandleChecker,
116clang-analyzer-nullability.NullPassedToNonnull,
117clang-analyzer-nullability.NullReturnedFromNonnull,
118clang-analyzer-nullability.NullabilityBase,
119clang-analyzer-nullability.NullableDereferenced,
120clang-analyzer-nullability.NullablePassedToNonnull,
121clang-analyzer-nullability.NullableReturnedFromNonnull,
122clang-analyzer-optin.cplusplus.UninitializedObject,
123clang-analyzer-optin.cplusplus.VirtualCall,
124clang-analyzer-optin.mpi.MPI-Checker,
125clang-analyzer-optin.osx.OSObjectCStyleCast,
126clang-analyzer-optin.osx.cocoa.localizability.EmptyLocalizationContextChecker,
127clang-analyzer-optin.osx.cocoa.localizability.NonLocalizedStringChecker,
128clang-analyzer-optin.performance.GCDAntipattern,
129clang-analyzer-optin.performance.Padding,
130clang-analyzer-optin.portability.UnixAPI,
131clang-analyzer-osx.API,
132clang-analyzer-osx.MIG,
133clang-analyzer-osx.NSOrCFErrorDerefChecker,
134clang-analyzer-osx.NumberObjectConversion,
135clang-analyzer-osx.OSObjectRetainCount,
136clang-analyzer-osx.ObjCProperty,
137clang-analyzer-osx.SecKeychainAPI,
138clang-analyzer-osx.cocoa.AtSync,
139clang-analyzer-osx.cocoa.AutoreleaseWrite,
140clang-analyzer-osx.cocoa.ClassRelease,
141clang-analyzer-osx.cocoa.Dealloc,
142clang-analyzer-osx.cocoa.IncompatibleMethodTypes,
143clang-analyzer-osx.cocoa.Loops,
144clang-analyzer-osx.cocoa.MissingSuperCall,
145clang-analyzer-osx.cocoa.NSAutoreleasePool,
146clang-analyzer-osx.cocoa.NSError,
147clang-analyzer-osx.cocoa.NilArg,
148clang-analyzer-osx.cocoa.NonNilReturnValue,
149clang-analyzer-osx.cocoa.ObjCGenerics,
150clang-analyzer-osx.cocoa.RetainCount,
151clang-analyzer-osx.cocoa.RetainCountBase,
152clang-analyzer-osx.cocoa.RunLoopAutoreleaseLeak,
153clang-analyzer-osx.cocoa.SelfInit,
154clang-analyzer-osx.cocoa.SuperDealloc,
155clang-analyzer-osx.cocoa.UnusedIvars,
156clang-analyzer-osx.cocoa.VariadicMethodTypes,
157clang-analyzer-osx.coreFoundation.CFError,
158clang-analyzer-osx.coreFoundation.CFNumber,
159clang-analyzer-osx.coreFoundation.CFRetainRelease,
160clang-analyzer-osx.coreFoundation.containers.OutOfBounds,
161clang-analyzer-osx.coreFoundation.containers.PointerSizedValues,
162clang-analyzer-security.FloatLoopCounter,
163clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,
164clang-analyzer-security.insecureAPI.SecuritySyntaxChecker,
165clang-analyzer-security.insecureAPI.UncheckedReturn,
166clang-analyzer-security.insecureAPI.bcmp,
167clang-analyzer-security.insecureAPI.bcopy,
168clang-analyzer-security.insecureAPI.bzero,
169clang-analyzer-security.insecureAPI.decodeValueOfObjCType,
170clang-analyzer-security.insecureAPI.getpw,
171clang-analyzer-security.insecureAPI.gets,
172clang-analyzer-security.insecureAPI.mkstemp,
173clang-analyzer-security.insecureAPI.mktemp,
174clang-analyzer-security.insecureAPI.rand,
175clang-analyzer-security.insecureAPI.strcpy,
176clang-analyzer-security.insecureAPI.vfork,
177clang-analyzer-unix.API,
178clang-analyzer-unix.DynamicMemoryModeling,
179clang-analyzer-unix.Malloc,
180clang-analyzer-unix.MallocSizeof,
181clang-analyzer-unix.MismatchedDeallocator,
182clang-analyzer-unix.Vfork,
183clang-analyzer-unix.cstring.BadSizeArg,
184clang-analyzer-unix.cstring.CStringModeling,
185clang-analyzer-unix.cstring.NullArg,
186clang-analyzer-valist.CopyToSelf,
187clang-analyzer-valist.Uninitialized,
188clang-analyzer-valist.Unterminated,
189clang-analyzer-valist.ValistBase,
190clang-analyzer-webkit.NoUncountedMemberChecker,
191clang-analyzer-webkit.RefCntblBaseVirtualDtor,
192misc-misplaced-const,
193#misc-no-recursion,
194misc-redundant-expression,
195misc-static-assert,
196misc-throw-by-value-catch-by-reference,
197misc-unconventional-assign-operator,
198misc-uniqueptr-reset-release,
199misc-unused-using-decls,
200modernize-avoid-bind,
201modernize-deprecated-headers,
202modernize-deprecated-ios-base-aliases,
203modernize-loop-convert,
204modernize-make-shared,
205modernize-make-unique,
206modernize-raw-string-literal,
207modernize-replace-auto-ptr,
208modernize-replace-random-shuffle,
209modernize-return-braced-init-list,
210modernize-shrink-to-fit,
211modernize-unary-static-assert,
212modernize-use-bool-literals,
213modernize-use-default-member-init,
214modernize-use-emplace,
215modernize-use-equals-default,
216modernize-use-equals-delete,
217modernize-use-noexcept,
218modernize-use-nullptr,
219modernize-use-override,
220modernize-use-transparent-functors,
221modernize-use-uncaught-exceptions,
222modernize-use-using,
223performance-faster-string-find,
224performance-for-range-copy,
225performance-implicit-conversion-in-loop,
226performance-inefficient-algorithm,
227performance-inefficient-string-concatenation,
228performance-inefficient-vector-operation,
229performance-move-const-arg,
230performance-move-constructor-init,
231performance-no-automatic-move,
232performance-noexcept-move-constructor,
233performance-trivially-destructible,
234performance-type-promotion-in-math-fn,
235performance-unnecessary-copy-initialization,
236performance-unnecessary-value-param,
237readability-braces-around-statements,
238readability-const-return-type,
239readability-delete-null-pointer,
240readability-deleted-default,
241readability-else-after-return,
242readability-identifier-naming'
243
244WarningsAsErrors: '*'
245HeaderFilterRegex: '.*'
246CheckOptions:
247  - { key: readability-identifier-naming.ClassCase,     value: CamelCase  }
248  - { key: readability-identifier-naming.VariableCase,  value: camelBack }
249  - { key: readability-identifier-naming.FunctionCase,  value: camelBack }
250  - { key: readability-identifier-naming.ParameterCase, value: camelBack }
251  - { key: readability-identifier-naming.NamespaceCase, value: lower_case }
252  - { key: readability-identifier-naming.StructCase,    value: CamelCase  }
253
254