.clang-tidy 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. #
  2. # Copyright (c) 2008-2020 the Urho3D project.
  3. #
  4. # Permission is hereby granted, free of charge, to any person obtaining a copy
  5. # of this software and associated documentation files (the "Software"), to deal
  6. # in the Software without restriction, including without limitation the rights
  7. # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  8. # copies of the Software, and to permit persons to whom the Software is
  9. # furnished to do so, subject to the following conditions:
  10. #
  11. # The above copyright notice and this permission notice shall be included in
  12. # all copies or substantial portions of the Software.
  13. #
  14. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  19. # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  20. # THE SOFTWARE.
  21. #
  22. ---
  23. 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'
  24. WarningsAsErrors: ''
  25. HeaderFilterRegex: ''
  26. AnalyzeTemporaryDtors: false
  27. FormatStyle: none
  28. CheckOptions:
  29. - key: abseil-string-find-startswith.AbseilStringsMatchHeader
  30. value: 'absl/strings/match.h'
  31. - key: abseil-string-find-startswith.IncludeStyle
  32. value: llvm
  33. - key: abseil-string-find-startswith.StringLikeClasses
  34. value: '::std::basic_string'
  35. - key: bugprone-argument-comment.CommentBoolLiterals
  36. value: '0'
  37. - key: bugprone-argument-comment.CommentCharacterLiterals
  38. value: '0'
  39. - key: bugprone-argument-comment.CommentFloatLiterals
  40. value: '0'
  41. - key: bugprone-argument-comment.CommentIntegerLiterals
  42. value: '0'
  43. - key: bugprone-argument-comment.CommentNullPtrs
  44. value: '0'
  45. - key: bugprone-argument-comment.CommentStringLiterals
  46. value: '0'
  47. - key: bugprone-argument-comment.CommentUserDefinedLiterals
  48. value: '0'
  49. - key: bugprone-argument-comment.IgnoreSingleArgument
  50. value: '0'
  51. - key: bugprone-argument-comment.StrictMode
  52. value: '0'
  53. - key: bugprone-assert-side-effect.AssertMacros
  54. value: assert
  55. - key: bugprone-assert-side-effect.CheckFunctionCalls
  56. value: '0'
  57. - key: bugprone-dangling-handle.HandleClasses
  58. value: 'std::basic_string_view;std::experimental::basic_string_view'
  59. - key: bugprone-dynamic-static-initializers.HeaderFileExtensions
  60. value: ',h,hh,hpp,hxx'
  61. - key: bugprone-misplaced-widening-cast.CheckImplicitCasts
  62. value: '0'
  63. - key: bugprone-not-null-terminated-result.WantToUseSafeFunctions
  64. value: '1'
  65. - key: bugprone-sizeof-expression.WarnOnSizeOfCompareToConstant
  66. value: '1'
  67. - key: bugprone-sizeof-expression.WarnOnSizeOfConstant
  68. value: '1'
  69. - key: bugprone-sizeof-expression.WarnOnSizeOfIntegerExpression
  70. value: '0'
  71. - key: bugprone-sizeof-expression.WarnOnSizeOfThis
  72. value: '1'
  73. - key: bugprone-string-constructor.LargeLengthThreshold
  74. value: '8388608'
  75. - key: bugprone-string-constructor.WarnOnLargeLength
  76. value: '1'
  77. - key: bugprone-suspicious-enum-usage.StrictMode
  78. value: '0'
  79. - key: bugprone-suspicious-missing-comma.MaxConcatenatedTokens
  80. value: '5'
  81. - key: bugprone-suspicious-missing-comma.RatioThreshold
  82. value: '0.200000'
  83. - key: bugprone-suspicious-missing-comma.SizeThreshold
  84. value: '5'
  85. - key: bugprone-suspicious-string-compare.StringCompareLikeFunctions
  86. value: ''
  87. - key: bugprone-suspicious-string-compare.WarnOnImplicitComparison
  88. value: '1'
  89. - key: bugprone-suspicious-string-compare.WarnOnLogicalNotComparison
  90. value: '0'
  91. - key: bugprone-too-small-loop-variable.MagnitudeBitsUpperLimit
  92. value: '16'
  93. - key: bugprone-unhandled-self-assignment.WarnOnlyIfThisHasSuspiciousField
  94. value: '1'
  95. - key: bugprone-unused-return-value.CheckedFunctions
  96. value: '::std::async;::std::launder;::std::remove;::std::remove_if;::std::unique;::std::unique_ptr::release;::std::basic_string::empty;::std::vector::empty'
  97. - key: cert-dcl16-c.NewSuffixes
  98. value: 'L;LL;LU;LLU'
  99. - key: cert-msc51-cpp.DisallowedSeedTypes
  100. value: 'time_t,std::time_t'
  101. - key: cert-oop54-cpp.WarnOnlyIfThisHasSuspiciousField
  102. value: '0'
  103. - key: cppcoreguidelines-explicit-virtual-functions.IgnoreDestructors
  104. value: '1'
  105. - key: cppcoreguidelines-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
  106. value: '1'
  107. - key: cppcoreguidelines-pro-type-member-init.IgnoreArrays
  108. value: '0'
  109. - key: cppcoreguidelines-pro-type-member-init.UseAssignment
  110. value: '0'
  111. - key: google-readability-braces-around-statements.ShortStatementLines
  112. value: '1'
  113. - key: google-readability-function-size.StatementThreshold
  114. value: '800'
  115. - key: google-readability-namespace-comments.ShortNamespaceLines
  116. value: '10'
  117. - key: google-readability-namespace-comments.SpacesBeforeComments
  118. value: '2'
  119. - key: hicpp-multiway-paths-covered.WarnOnMissingElse
  120. value: '0'
  121. - key: hicpp-signed-bitwise.IgnorePositiveIntegerLiterals
  122. value: '0'
  123. - key: misc-throw-by-value-catch-by-reference.CheckThrowTemporaries
  124. value: '1'
  125. - key: modernize-loop-convert.MaxCopySize
  126. value: '16'
  127. - key: modernize-loop-convert.MinConfidence
  128. value: reasonable
  129. - key: modernize-loop-convert.NamingStyle
  130. value: CamelCase
  131. - key: modernize-make-shared.IgnoreMacros
  132. value: '1'
  133. - key: modernize-make-shared.IncludeStyle
  134. value: '0'
  135. - key: modernize-make-shared.MakeSmartPtrFunction
  136. value: 'std::make_shared'
  137. - key: modernize-make-shared.MakeSmartPtrFunctionHeader
  138. value: memory
  139. - key: modernize-make-unique.IgnoreMacros
  140. value: '1'
  141. - key: modernize-make-unique.IncludeStyle
  142. value: '0'
  143. - key: modernize-make-unique.MakeSmartPtrFunction
  144. value: 'std::make_unique'
  145. - key: modernize-make-unique.MakeSmartPtrFunctionHeader
  146. value: memory
  147. - key: modernize-pass-by-value.IncludeStyle
  148. value: llvm
  149. - key: modernize-pass-by-value.ValuesOnly
  150. value: '0'
  151. - key: modernize-raw-string-literal.ReplaceShorterLiterals
  152. value: '0'
  153. - key: modernize-replace-auto-ptr.IncludeStyle
  154. value: llvm
  155. - key: modernize-replace-random-shuffle.IncludeStyle
  156. value: llvm
  157. - key: modernize-use-auto.MinTypeNameLength
  158. value: '5'
  159. - key: modernize-use-auto.RemoveStars
  160. value: '0'
  161. - key: modernize-use-emplace.ContainersWithPushBack
  162. value: '::std::vector;::std::list;::std::deque'
  163. - key: modernize-use-emplace.SmartPointers
  164. value: '::std::shared_ptr;::std::unique_ptr;::std::auto_ptr;::std::weak_ptr'
  165. - key: modernize-use-emplace.TupleMakeFunctions
  166. value: '::std::make_pair;::std::make_tuple'
  167. - key: modernize-use-emplace.TupleTypes
  168. value: '::std::pair;::std::tuple'
  169. - key: modernize-use-equals-default.IgnoreMacros
  170. value: '1'
  171. - key: modernize-use-equals-delete.IgnoreMacros
  172. value: '1'
  173. - key: modernize-use-nodiscard.ReplacementString
  174. value: '[[nodiscard]]'
  175. - key: modernize-use-noexcept.ReplacementString
  176. value: ''
  177. - key: modernize-use-noexcept.UseNoexceptFalse
  178. value: '1'
  179. - key: modernize-use-nullptr.NullMacros
  180. value: 'NULL'
  181. - key: modernize-use-override.AllowOverrideAndFinal
  182. value: '0'
  183. - key: modernize-use-override.FinalSpelling
  184. value: final
  185. - key: modernize-use-override.IgnoreDestructors
  186. value: '0'
  187. - key: modernize-use-override.OverrideSpelling
  188. value: override
  189. - key: modernize-use-transparent-functors.SafeMode
  190. value: '0'
  191. - key: performance-faster-string-find.StringLikeClasses
  192. value: 'std::basic_string'
  193. - key: performance-for-range-copy.AllowedTypes
  194. value: ''
  195. - key: performance-for-range-copy.WarnOnAllAutoCopies
  196. value: '0'
  197. - key: performance-inefficient-string-concatenation.StrictMode
  198. value: '0'
  199. - key: performance-inefficient-vector-operation.EnableProto
  200. value: '0'
  201. - key: performance-inefficient-vector-operation.VectorLikeClasses
  202. value: '::std::vector'
  203. - key: performance-move-const-arg.CheckTriviallyCopyableMove
  204. value: '1'
  205. - key: performance-move-constructor-init.IncludeStyle
  206. value: llvm
  207. - key: performance-no-automatic-move.AllowedTypes
  208. value: ''
  209. - key: performance-type-promotion-in-math-fn.IncludeStyle
  210. value: llvm
  211. - key: performance-unnecessary-copy-initialization.AllowedTypes
  212. value: ''
  213. - key: performance-unnecessary-value-param.AllowedTypes
  214. value: ''
  215. - key: performance-unnecessary-value-param.IncludeStyle
  216. value: llvm
  217. - key: portability-simd-intrinsics.Std
  218. value: ''
  219. - key: portability-simd-intrinsics.Suggest
  220. value: '0'
  221. - key: readability-inconsistent-declaration-parameter-name.IgnoreMacros
  222. value: '1'
  223. - key: readability-inconsistent-declaration-parameter-name.Strict
  224. value: '0'
  225. - key: readability-redundant-smartptr-get.IgnoreMacros
  226. value: '1'
  227. - key: readability-redundant-string-init.StringNames
  228. value: '::std::basic_string'
  229. - key: readability-simplify-subscript-expr.Types
  230. value: '::std::basic_string;::std::basic_string_view;::std::vector;::std::array'
  231. - key: readability-static-accessed-through-instance.NameSpecifierNestingThreshold
  232. value: '3'
  233. ...
  234. # vi: set ts=2 sw=2 expandtab: