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