-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.clang-tidy
48 lines (48 loc) · 11 KB
/
.clang-tidy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# List taken from https://releases.llvm.org/16.0.0/tools/clang/tools/extra/docs/clang-tidy/checks/list.html
Checks: 'abseil-cleanup-ctad, abseil-duration-addition, abseil-duration-comparison, abseil-duration-conversion-cast, abseil-duration-division, abseil-duration-factory-float, abseil-duration-factory-scale, abseil-duration-subtraction, abseil-duration-unnecessary-conversion, abseil-faster-strsplit-delimiter, abseil-no-internal-dependencies, abseil-no-namespace, abseil-redundant-strcat-calls, abseil-str-cat-append, abseil-string-find-startswith, abseil-string-find-str-contains, abseil-time-comparison, abseil-time-subtraction, abseil-upgrade-duration-conversions, boost-use-to-string, bugprone-argument-comment, bugprone-assert-side-effect, bugprone-assignment-in-if-condition, bugprone-bad-signal-to-kill-thread, bugprone-bool-pointer-implicit-conversion, bugprone-branch-clone, bugprone-copy-constructor-init, bugprone-dangling-handle, bugprone-dynamic-static-initializers, bugprone-easily-swappable-parameters, bugprone-exception-escape, bugprone-fold-init-type, bugprone-forward-declaration-namespace, bugprone-forwarding-reference-overload, bugprone-implicit-widening-of-multiplication-result, bugprone-inaccurate-erase, bugprone-incorrect-roundings, bugprone-infinite-loop, bugprone-integer-division, bugprone-lambda-function-name, bugprone-macro-parentheses, bugprone-macro-repeated-side-effects, bugprone-misplaced-operator-in-strlen-in-alloc, bugprone-misplaced-pointer-arithmetic-in-alloc, bugprone-misplaced-widening-cast, bugprone-move-forwarding-reference, bugprone-multiple-statement-macro, bugprone-no-escape, bugprone-not-null-terminated-result, bugprone-parent-virtual-call, bugprone-posix-return, bugprone-redundant-branch-condition, bugprone-reserved-identifier, bugprone-shared-ptr-array-mismatch, bugprone-signal-handler, bugprone-signed-char-misuse, bugprone-sizeof-container, bugprone-sizeof-expression, bugprone-spuriously-wake-up-functions, bugprone-standalone-empty, bugprone-string-constructor, bugprone-string-integer-assignment, bugprone-string-literal-with-embedded-nul, bugprone-stringview-nullptr, bugprone-suspicious-enum-usage, bugprone-suspicious-include, bugprone-suspicious-memory-comparison, bugprone-suspicious-memset-usage, bugprone-suspicious-missing-comma, bugprone-suspicious-realloc-usage, bugprone-suspicious-semicolon, bugprone-suspicious-string-compare, bugprone-swapped-arguments, bugprone-terminating-continue, bugprone-throw-keyword-missing, bugprone-too-small-loop-variable, bugprone-unchecked-optional-access, bugprone-undefined-memory-manipulation, bugprone-undelegated-constructor, bugprone-unhandled-exception-at-new, bugprone-unhandled-self-assignment, bugprone-unused-raii, bugprone-unused-return-value, bugprone-use-after-move, bugprone-virtual-near-miss, cert-dcl21-cpp, cert-dcl50-cpp, cert-dcl58-cpp, cert-env33-c, cert-err33-c, cert-err34-c, cert-err52-cpp, cert-err58-cpp, cert-err60-cpp, cert-flp30-c, cert-mem57-cpp, cert-msc50-cpp, cert-msc51-cpp, cert-oop57-cpp, cert-oop58-cpp, clang-analyzer-core.DynamicTypePropagation, clang-analyzer-core.uninitialized.CapturedBlockVariable, clang-analyzer-cplusplus.InnerPointer, clang-analyzer-nullability.NullableReturnedFromNonnull, clang-analyzer-optin.osx.OSObjectCStyleCast, clang-analyzer-optin.performance.GCDAntipattern, clang-analyzer-optin.performance.Padding, clang-analyzer-optin.portability.UnixAPI, clang-analyzer-valist.CopyToSelf, clang-analyzer-valist.Uninitialized, clang-analyzer-valist.Unterminated, concurrency-mt-unsafe, concurrency-thread-canceltype-asynchronous, cppcoreguidelines-avoid-const-or-ref-data-members, cppcoreguidelines-avoid-do-while, cppcoreguidelines-avoid-goto, cppcoreguidelines-avoid-non-const-global-variables, cppcoreguidelines-avoid-reference-coroutine-parameters, cppcoreguidelines-init-variables, cppcoreguidelines-interfaces-global-init, cppcoreguidelines-macro-usage, cppcoreguidelines-narrowing-conversions, cppcoreguidelines-no-malloc, # cppcoreguidelines-non-private-member-variables-in-classes, # cppcoreguidelines-owning-memory, # cppcoreguidelines-pro-bounds-array-to-pointer-decay, cppcoreguidelines-pro-bounds-constant-array-index, cppcoreguidelines-pro-bounds-pointer-arithmetic, cppcoreguidelines-pro-type-const-cast, cppcoreguidelines-pro-type-cstyle-cast, cppcoreguidelines-pro-type-member-init, cppcoreguidelines-pro-type-reinterpret-cast, cppcoreguidelines-pro-type-static-cast-downcast, cppcoreguidelines-pro-type-union-access, # cppcoreguidelines-pro-type-vararg, cppcoreguidelines-slicing, cppcoreguidelines-special-member-functions, google-build-explicit-make-pair, google-build-namespaces, google-build-using-namespace, google-default-arguments, google-explicit-constructor, google-global-names-in-headers, google-readability-avoid-underscore-in-googletest-name, google-readability-braces-around-statements, # google-readability-casting, google-readability-function-size, google-readability-namespace-comments, google-readability-todo, google-runtime-int, google-runtime-operator, google-upgrade-googletest-case, cppcoreguidelines-virtual-class-destructor, hicpp-avoid-goto, hicpp-exception-baseclass, hicpp-multiway-paths-covered, hicpp-no-assembler, hicpp-signed-bitwise, # llvm-header-guard, llvm-include-order, llvm-namespace-comment, llvm-prefer-isa-or-dyn-cast-in-conditionals, llvm-prefer-register-over-unsigned, llvm-twine-local, # llvmlibc-callee-namespace, # llvmlibc-implementation-in-namespace, # llvmlibc-restrict-system-libc-headers, misc-confusable-identifiers, misc-const-correctness, misc-definitions-in-headers, misc-misleading-bidirectional, misc-misleading-identifier, misc-misplaced-const, misc-new-delete-overloads, misc-no-recursion, misc-non-copyable-objects, # misc-non-private-member-variables-in-classes, misc-redundant-expression, misc-static-assert, misc-throw-by-value-catch-by-reference, misc-unconventional-assign-operator, misc-uniqueptr-reset-release, misc-unused-alias-decls, misc-unused-parameters, misc-unused-using-decls, misc-use-anonymous-namespace, modernize-avoid-bind, modernize-avoid-c-arrays, modernize-concat-nested-namespaces, modernize-deprecated-headers, modernize-deprecated-ios-base-aliases, modernize-loop-convert, modernize-macro-to-enum, modernize-make-shared, modernize-make-unique, # modernize-pass-by-value, # Clashes with SonarLints rule about not passing expensive things by value modernize-raw-string-literal, modernize-redundant-void-arg, modernize-replace-auto-ptr, modernize-replace-disallow-copy-and-assign-macro, modernize-replace-random-shuffle, modernize-return-braced-init-list, modernize-shrink-to-fit, modernize-unary-static-assert, modernize-use-auto, modernize-use-bool-literals, modernize-use-default-member-init, modernize-use-emplace, modernize-use-equals-default, modernize-use-equals-delete, modernize-use-nodiscard, modernize-use-noexcept, modernize-use-nullptr, modernize-use-override, # modernize-use-trailing-return-type, modernize-use-transparent-functors, modernize-use-uncaught-exceptions, modernize-use-using, mpi-buffer-deref, mpi-type-mismatch, openmp-exception-escape, openmp-use-default-none, performance-faster-string-find, performance-for-range-copy, performance-implicit-conversion-in-loop, performance-inefficient-algorithm, performance-inefficient-string-concatenation, performance-inefficient-vector-operation, performance-move-const-arg, performance-move-constructor-init, performance-no-automatic-move, performance-no-int-to-ptr, performance-noexcept-move-constructor, performance-trivially-destructible, performance-type-promotion-in-math-fn, performance-unnecessary-copy-initialization, performance-unnecessary-value-param, portability-restrict-system-includes, portability-simd-intrinsics, portability-std-allocator-const, readability-avoid-const-params-in-decls, readability-braces-around-statements, readability-const-return-type, readability-container-contains, readability-container-data-pointer, readability-container-size-empty, readability-convert-member-functions-to-static, readability-delete-null-pointer, readability-duplicate-include, readability-else-after-return, readability-function-cognitive-complexity, readability-function-size, # readability-identifier-length, readability-identifier-naming, readability-implicit-bool-conversion, readability-inconsistent-declaration-parameter-name, readability-isolate-declaration, readability-magic-numbers, readability-make-member-function-const, readability-misleading-indentation, readability-misplaced-array-index, readability-named-parameter, readability-non-const-parameter, readability-qualified-auto, readability-redundant-access-specifiers, readability-redundant-control-flow, readability-redundant-declaration, readability-redundant-function-ptr-dereference, readability-redundant-member-init, readability-redundant-preprocessor, readability-redundant-smartptr-get, readability-redundant-string-cstr, readability-redundant-string-init, readability-simplify-boolean-expr, readability-simplify-subscript-expr, readability-static-accessed-through-instance, readability-static-definition-in-anonymous-namespace, readability-string-compare, readability-suspicious-call-argument, readability-uniqueptr-delete-release, readability-uppercase-literal-suffix, readability-use-anyofallof'
CheckOptions:
- key: bugprone-assert-side-effect.AssertMacros
value: 'ASSERT'
- key: bugprone-dangling-handle.HandleClasses
value: 'std::basic_string_view;std::experimental::basic_string_view;absl::string_view'
- key: modernize-use-auto.MinTypeNameLength
value: '10'
- key: readability-function-cognitive-complexity.Threshold
value: '50'
- key: bugprone-assert-side-effect.AssertMacros
value: 'ASSERT'
- key: bugprone-dangling-handle.HandleClasses
value: 'std::basic_string_view;std::experimental::basic_string_view;absl::string_view'
- key: modernize-use-auto.MinTypeNameLength
value: '10'
- key: readability-identifier-naming.ClassCase
value: 'CamelCase'
- key: readability-identifier-naming.EnumCase
value: 'CamelCase'
- key: readability-identifier-naming.EnumConstantCase
value: 'UPPER_CASE'
- key: readability-identifier-naming.ParameterCase
value: 'lower_case'
- key: readability-identifier-naming.PrivateMemberCase
value: 'lower_case'
- key: readability-identifier-naming.PrivateMemberSuffix
value: '_'
- key: readability-identifier-naming.PublicMemberCase
value: 'lower_case'
- key: readability-identifier-naming.StructCase
value: 'CamelCase'
- key: readability-identifier-naming.TypeAliasCase
value: 'CamelCase'
- key: readability-identifier-naming.UnionCase
value: 'CamelCase'
- key: readability-identifier-naming.FunctionCase
value: 'lower_case'
- key: bugprone-easily-swappable-parameters.IgnoredParameterNames
value: '"";iterator;begin;end;first;last;lhs;rhs;a;b'
- key: bugprone-easily-swappable-parameters.SuppressParametersUsedTogether
value: 'false'
- key: bugprone-easily-swappable-parameters.NamePrefixSuffixSilenceDissimilarityTreshold
value: '0'
- key: readability-suspicious-call-argument.MinimumIdentifierNameLength
value: '1'
WarningsAsErrors: 'readability-identifier-naming'