.clang-tidy 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. # Copyright (c) 2008-2023 the Urho3D project
  2. # License: MIT
  3. ---
  4. Checks: 'clang-diagnostic-*,clang-analyzer-*,*,-android-*,-bugprone-bool-pointer-implicit-conversion,-bugprone-exception-escape,-bugprone-infinite-loop,-bugprone-signed-char-misuse,-cert-dcl50-cpp,-cert-env33-c,-cert-mem57-cpp,-cert-oop57-cpp,-cert-oop58-cpp,-clang-analyzer-*,-clang-diagnostic-*,-cppcoreguidelines-avoid-goto,-cppcoreguidelines-avoid-non-const-global-variables,-cppcoreguidelines-init-variables,-cppcoreguidelines-macro-usage,-cppcoreguidelines-no-malloc,-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-reinterpret-cast,-cppcoreguidelines-pro-type-union-access,-cppcoreguidelines-pro-type-vararg,-cppcoreguidelines-special-member-functions,-darwin-*,-fuchsia-*,-google-*,-hicpp-avoid-goto,-hicpp-no-assembler,-linuxkernel-*,-llvm-*,-llvmlibc-*,-misc-bool-pointer-implicit-conversion,-misc-definitions-in-headers,-misc-non-private-member-variables-in-classes,-misc-redundant-expression,-misc-static-assert,-misc-unused-alias-decls,-misc-unused-parameters,-misc-unused-using-decls,-modernize-avoid-c-arrays,-modernize-use-default-member-init,-modernize-use-trailing-return-type,-modernize-use-using,-objc-*,-openmp-exception-escape,-portability-restrict-system-includes,-readability-braces-around-statements,-readability-else-after-return,-readability-function-size,-readability-identifier-naming,-readability-implicit-bool-conversion,-readability-isolate-declaration,-readability-magic-numbers,-readability-named-parameter,-readability-qualified-auto,-readability-redundant-access-specifiers,-readability-redundant-member-init,-readability-redundant-preprocessor,-readability-simplify-boolean-expr,-readability-uppercase-literal-suffix,-zircon-*,-bugprone-narrowing-conversions,-cert-con36-c,-cert-con54-cpp,-cert-dcl03-c,-cert-dcl16-c,-cert-dcl37-c,-cert-dcl51-cpp,-cert-dcl54-cpp,-cert-dcl59-cpp,-cert-err09-cpp,-cert-err61-cpp,-cert-fio38-c,-cert-msc30-c,-cert-msc32-c,-cert-oop11-cpp,-cert-oop54-cpp,-cert-pos44-c,-cppcoreguidelines-avoid-c-arrays,-cppcoreguidelines-avoid-magic-numbers,-cppcoreguidelines-c-copy-assignment-signature,-cppcoreguidelines-explicit-virtual-functions,-cppcoreguidelines-non-private-member-variables-in-classes,-fuchsia-header-anon-namespaces,-google-readability-braces-around-statements,-google-readability-function-size,-google-readability-namespace-comments,-hicpp-avoid-c-arrays,-hicpp-braces-around-statements,-hicpp-deprecated-headers,-hicpp-explicit-conversions,-hicpp-function-size,-hicpp-invalid-access-moved,-hicpp-member-init,-hicpp-move-const-arg,-hicpp-named-parameter,-hicpp-new-delete-operators,-hicpp-no-array-decay,-hicpp-no-malloc,-hicpp-noexcept-move,-hicpp-special-member-functions,-hicpp-static-assert,-hicpp-undelegated-constructor,-hicpp-uppercase-literal-suffix,-hicpp-use-auto,-hicpp-use-emplace,-hicpp-use-equals-default,-hicpp-use-equals-delete,-hicpp-use-noexcept,-hicpp-use-nullptr,-hicpp-use-override,-hicpp-vararg,google-default-arguments,google-explicit-constructor,google-runtime-operator'
  5. WarningsAsErrors: ''
  6. HeaderFilterRegex: ''
  7. AnalyzeTemporaryDtors: false
  8. FormatStyle: none
  9. CheckOptions:
  10. - key: abseil-string-find-startswith.AbseilStringsMatchHeader
  11. value: 'absl/strings/match.h'
  12. - key: abseil-string-find-startswith.IncludeStyle
  13. value: llvm
  14. - key: abseil-string-find-startswith.StringLikeClasses
  15. value: '::std::basic_string'
  16. - key: bugprone-argument-comment.CommentBoolLiterals
  17. value: '0'
  18. - key: bugprone-argument-comment.CommentCharacterLiterals
  19. value: '0'
  20. - key: bugprone-argument-comment.CommentFloatLiterals
  21. value: '0'
  22. - key: bugprone-argument-comment.CommentIntegerLiterals
  23. value: '0'
  24. - key: bugprone-argument-comment.CommentNullPtrs
  25. value: '0'
  26. - key: bugprone-argument-comment.CommentStringLiterals
  27. value: '0'
  28. - key: bugprone-argument-comment.CommentUserDefinedLiterals
  29. value: '0'
  30. - key: bugprone-argument-comment.IgnoreSingleArgument
  31. value: '0'
  32. - key: bugprone-argument-comment.StrictMode
  33. value: '0'
  34. - key: bugprone-assert-side-effect.AssertMacros
  35. value: assert
  36. - key: bugprone-assert-side-effect.CheckFunctionCalls
  37. value: '0'
  38. - key: bugprone-dangling-handle.HandleClasses
  39. value: 'std::basic_string_view;std::experimental::basic_string_view'
  40. - key: bugprone-dynamic-static-initializers.HeaderFileExtensions
  41. value: ',h,hh,hpp,hxx'
  42. - key: bugprone-misplaced-widening-cast.CheckImplicitCasts
  43. value: '0'
  44. - key: bugprone-not-null-terminated-result.WantToUseSafeFunctions
  45. value: '1'
  46. - key: bugprone-sizeof-expression.WarnOnSizeOfCompareToConstant
  47. value: '1'
  48. - key: bugprone-sizeof-expression.WarnOnSizeOfConstant
  49. value: '1'
  50. - key: bugprone-sizeof-expression.WarnOnSizeOfIntegerExpression
  51. value: '0'
  52. - key: bugprone-sizeof-expression.WarnOnSizeOfThis
  53. value: '1'
  54. - key: bugprone-string-constructor.LargeLengthThreshold
  55. value: '8388608'
  56. - key: bugprone-string-constructor.WarnOnLargeLength
  57. value: '1'
  58. - key: bugprone-suspicious-enum-usage.StrictMode
  59. value: '0'
  60. - key: bugprone-suspicious-missing-comma.MaxConcatenatedTokens
  61. value: '5'
  62. - key: bugprone-suspicious-missing-comma.RatioThreshold
  63. value: '0.200000'
  64. - key: bugprone-suspicious-missing-comma.SizeThreshold
  65. value: '5'
  66. - key: bugprone-suspicious-string-compare.StringCompareLikeFunctions
  67. value: ''
  68. - key: bugprone-suspicious-string-compare.WarnOnImplicitComparison
  69. value: '1'
  70. - key: bugprone-suspicious-string-compare.WarnOnLogicalNotComparison
  71. value: '0'
  72. - key: bugprone-too-small-loop-variable.MagnitudeBitsUpperLimit
  73. value: '16'
  74. - key: bugprone-unhandled-self-assignment.WarnOnlyIfThisHasSuspiciousField
  75. value: '1'
  76. - key: bugprone-unused-return-value.CheckedFunctions
  77. value: '::std::async;::std::launder;::std::remove;::std::remove_if;::std::unique;::std::unique_ptr::release;::std::basic_string::empty;::std::vector::empty'
  78. - key: cert-dcl16-c.NewSuffixes
  79. value: 'L;LL;LU;LLU'
  80. - key: cert-msc51-cpp.DisallowedSeedTypes
  81. value: 'time_t,std::time_t'
  82. - key: cert-oop54-cpp.WarnOnlyIfThisHasSuspiciousField
  83. value: '0'
  84. - key: cppcoreguidelines-explicit-virtual-functions.IgnoreDestructors
  85. value: '1'
  86. - key: cppcoreguidelines-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
  87. value: '1'
  88. - key: cppcoreguidelines-pro-type-member-init.IgnoreArrays
  89. value: '0'
  90. - key: cppcoreguidelines-pro-type-member-init.UseAssignment
  91. value: '0'
  92. - key: google-readability-braces-around-statements.ShortStatementLines
  93. value: '1'
  94. - key: google-readability-function-size.StatementThreshold
  95. value: '800'
  96. - key: google-readability-namespace-comments.ShortNamespaceLines
  97. value: '10'
  98. - key: google-readability-namespace-comments.SpacesBeforeComments
  99. value: '2'
  100. - key: hicpp-multiway-paths-covered.WarnOnMissingElse
  101. value: '0'
  102. - key: hicpp-signed-bitwise.IgnorePositiveIntegerLiterals
  103. value: '0'
  104. - key: misc-throw-by-value-catch-by-reference.CheckThrowTemporaries
  105. value: '1'
  106. - key: modernize-loop-convert.MaxCopySize
  107. value: '16'
  108. - key: modernize-loop-convert.MinConfidence
  109. value: reasonable
  110. - key: modernize-loop-convert.NamingStyle
  111. value: CamelCase
  112. - key: modernize-make-shared.IgnoreMacros
  113. value: '1'
  114. - key: modernize-make-shared.IncludeStyle
  115. value: '0'
  116. - key: modernize-make-shared.MakeSmartPtrFunction
  117. value: 'std::make_shared'
  118. - key: modernize-make-shared.MakeSmartPtrFunctionHeader
  119. value: memory
  120. - key: modernize-make-unique.IgnoreMacros
  121. value: '1'
  122. - key: modernize-make-unique.IncludeStyle
  123. value: '0'
  124. - key: modernize-make-unique.MakeSmartPtrFunction
  125. value: 'std::make_unique'
  126. - key: modernize-make-unique.MakeSmartPtrFunctionHeader
  127. value: memory
  128. - key: modernize-pass-by-value.IncludeStyle
  129. value: llvm
  130. - key: modernize-pass-by-value.ValuesOnly
  131. value: '0'
  132. - key: modernize-raw-string-literal.ReplaceShorterLiterals
  133. value: '0'
  134. - key: modernize-replace-auto-ptr.IncludeStyle
  135. value: llvm
  136. - key: modernize-replace-random-shuffle.IncludeStyle
  137. value: llvm
  138. - key: modernize-use-auto.MinTypeNameLength
  139. value: '5'
  140. - key: modernize-use-auto.RemoveStars
  141. value: '0'
  142. - key: modernize-use-emplace.ContainersWithPushBack
  143. value: '::std::vector;::std::list;::std::deque'
  144. - key: modernize-use-emplace.SmartPointers
  145. value: '::std::shared_ptr;::std::unique_ptr;::std::auto_ptr;::std::weak_ptr'
  146. - key: modernize-use-emplace.TupleMakeFunctions
  147. value: '::std::make_pair;::std::make_tuple'
  148. - key: modernize-use-emplace.TupleTypes
  149. value: '::std::pair;::std::tuple'
  150. - key: modernize-use-equals-default.IgnoreMacros
  151. value: '1'
  152. - key: modernize-use-equals-delete.IgnoreMacros
  153. value: '1'
  154. - key: modernize-use-nodiscard.ReplacementString
  155. value: '[[nodiscard]]'
  156. - key: modernize-use-noexcept.ReplacementString
  157. value: ''
  158. - key: modernize-use-noexcept.UseNoexceptFalse
  159. value: '1'
  160. - key: modernize-use-nullptr.NullMacros
  161. value: 'NULL'
  162. - key: modernize-use-override.AllowOverrideAndFinal
  163. value: '0'
  164. - key: modernize-use-override.FinalSpelling
  165. value: final
  166. - key: modernize-use-override.IgnoreDestructors
  167. value: '0'
  168. - key: modernize-use-override.OverrideSpelling
  169. value: override
  170. - key: modernize-use-transparent-functors.SafeMode
  171. value: '0'
  172. - key: performance-faster-string-find.StringLikeClasses
  173. value: 'std::basic_string'
  174. - key: performance-for-range-copy.AllowedTypes
  175. value: ''
  176. - key: performance-for-range-copy.WarnOnAllAutoCopies
  177. value: '0'
  178. - key: performance-inefficient-string-concatenation.StrictMode
  179. value: '0'
  180. - key: performance-inefficient-vector-operation.EnableProto
  181. value: '0'
  182. - key: performance-inefficient-vector-operation.VectorLikeClasses
  183. value: '::std::vector'
  184. - key: performance-move-const-arg.CheckTriviallyCopyableMove
  185. value: '1'
  186. - key: performance-move-constructor-init.IncludeStyle
  187. value: llvm
  188. - key: performance-no-automatic-move.AllowedTypes
  189. value: ''
  190. - key: performance-type-promotion-in-math-fn.IncludeStyle
  191. value: llvm
  192. - key: performance-unnecessary-copy-initialization.AllowedTypes
  193. value: ''
  194. - key: performance-unnecessary-value-param.AllowedTypes
  195. value: ''
  196. - key: performance-unnecessary-value-param.IncludeStyle
  197. value: llvm
  198. - key: portability-simd-intrinsics.Std
  199. value: ''
  200. - key: portability-simd-intrinsics.Suggest
  201. value: '0'
  202. - key: readability-inconsistent-declaration-parameter-name.IgnoreMacros
  203. value: '1'
  204. - key: readability-inconsistent-declaration-parameter-name.Strict
  205. value: '0'
  206. - key: readability-redundant-smartptr-get.IgnoreMacros
  207. value: '1'
  208. - key: readability-redundant-string-init.StringNames
  209. value: '::std::basic_string'
  210. - key: readability-simplify-subscript-expr.Types
  211. value: '::std::basic_string;::std::basic_string_view;::std::vector;::std::array'
  212. - key: readability-static-accessed-through-instance.NameSpecifierNestingThreshold
  213. value: '3'
  214. ...
  215. # vi: set ts=2 sw=2 expandtab: