.clang-tidy 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. ---
  2. Checks: 'clang-diagnostic-*,clang-analyzer-*,*,-llvm-header-guard,-cppcoreguidelines-special-member-functions,-readability-avoid-const-params-in-decls,-modernize-use-equals-default,-hicpp-use-override,-hicpp-special-member-functions,-readability-redundant-member-init,-hicpp-use-equals-default,-modernize-use-using,-modernize-use-override,-cert-err58-cpp,-modernize-use-default-member-init,-google-runtime-references,-modernize-pass-by-value,-misc-misplaced-const,-cppcoreguidelines-pro-type-const-cast,-readability-else-after-return,-cppcoreguidelines-pro-bounds-constant-array-index,-cppcoreguidelines-pro-type-vararg,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-modernize-loop-convert,-modernize-use-auto,-readability-simplify-boolean-expr,-readability-inconsistent-declaration-parameter-name,-cert-msc30-c,-cert-msc50-cpp,-cppcoreguidelines-pro-type-static-cast-downcast,-cppcoreguidelines-pro-type-reinterpret-cast,-cppcoreguidelines-pro-type-union-access,-llvm-include-order,-google-runtime-int,-cppcoreguidelines-pro-type-member-init,-modernize-use-emplace,-hicpp-member-init,-cert-err34-c,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-no-malloc,-cert-dcl50-cpp,-clang-analyzer-core.CallAndMessage,-misc-macro-parentheses,-cppcoreguidelines-interfaces-global-init,-readability-redundant-string-cstr,-google-default-arguments,-cert-err52-cpp,-cert-env33-c,-clang-analyzer-cplusplus.NewDeleteLeaks,-clang-analyzer-cplusplus.NewDelete,-modernize-raw-string-literal,-clang-analyzer-core.DivideZero,-misc-misplaced-widening-cast,-modernize-return-braced-init-list,-clang-analyzer-core.NullDereference,-google-readability-function-size,-readability-function-size,-clang-analyzer-security.insecureAPI.strcpy,-CWE-119,-performance-type-promotion-in-math-fn,-google-readability-todo,-clang-analyzer-deadcode.DeadStores,-hicpp-function-size,-misc-definitions-in-headers,-misc-incorrect-roundings,-google-runtime-member-string-references,-google-explicit-constructor,-readability-misleading-indentation,-cert-dcl58-cpp,-hicpp-use-equals-delete,-misc-string-literal-with-embedded-nul,-hicpp-explicit-conversions,-modernize-use-equals-delete,-google-readability-braces-around-statements,-readability-braces-around-statements,-readability-redundant-declaration,-fuchsia-statically-constructed-objects,-bugprone-macro-parentheses,-bugprone-narrowing-conversions,-abseil-string-find-startswith,-clang-analyzer-core.StackAddressEscape,-abseil-string-find-startswith,-hicpp-multiway-paths-covered,-fuchsia-multiple-inheritance,-cppcoreguidelines-narrowing-conversions,-bugprone-misplaced-widening-cast,-bugprone-string-literal-with-embedded-nul,-bugprone-incorrect-roundings,-bugprone-parent-virtual-call,-cert-msc32-c,-cppcoreguidelines-narrowing-conversions,-cert-msc51-cpp,-cppcoreguidelines-non-private-member-variables-in-classes,-misc-non-private-member-variables-in-classes,-cppcoreguidelines-avoid-magic-numbers,-cppcoreguidelines-avoid-c-arrays,-readability-magic-numbers,-cppcoreguidelines-macro-usage,-hicpp-avoid-c-arrays,-readability-const-return-type,-modernize-avoid-c-arrays,-fuchsia-default-arguments-calls,-bugprone-branch-clone,-modernize-use-trailing-return-type,-cppcoreguidelines-explicit-virtual-functions,-bugprone-unhandled-self-assignment,-readability-convert-member-functions-to-static,-clang-analyzer-core.StackAddrEscapeBase,-bugprone-sizeof-expression,-cert-oop54-cpp'
  3. HeaderFilterRegex: '*'
  4. AnalyzeTemporaryDtors: false
  5. CheckOptions:
  6. - key: cert-dcl59-cpp.HeaderFileExtensions
  7. value: h,hh,hpp,hxx
  8. - key: cert-err09-cpp.CheckThrowTemporaries
  9. value: '1'
  10. - key: cert-err61-cpp.CheckThrowTemporaries
  11. value: '1'
  12. - key: cert-oop11-cpp.IncludeStyle
  13. value: llvm
  14. - key: cppcoreguidelines-no-malloc.Allocations
  15. value: '::malloc;::calloc'
  16. - key: cppcoreguidelines-no-malloc.Deallocations
  17. value: '::free'
  18. - key: cppcoreguidelines-no-malloc.Reallocations
  19. value: '::realloc'
  20. - key: cppcoreguidelines-pro-bounds-constant-array-index.GslHeader
  21. value: ''
  22. - key: cppcoreguidelines-pro-bounds-constant-array-index.IncludeStyle
  23. value: '0'
  24. - key: cppcoreguidelines-pro-type-member-init.IgnoreArrays
  25. value: '0'
  26. - key: cppcoreguidelines-special-member-functions.AllowMissingMoveFunctions
  27. value: '0'
  28. - key: cppcoreguidelines-special-member-functions.AllowSoleDefaultDtor
  29. value: '0'
  30. - key: google-build-namespaces.HeaderFileExtensions
  31. value: h,hh,hpp,hxx
  32. - key: google-global-names-in-headers.HeaderFileExtensions
  33. value: h
  34. - key: google-readability-braces-around-statements.ShortStatementLines
  35. value: '1'
  36. - key: google-readability-function-size.BranchThreshold
  37. value: '4294967295'
  38. - key: google-readability-function-size.LineThreshold
  39. value: '4294967295'
  40. - key: google-readability-function-size.ParameterThreshold
  41. value: '4294967295'
  42. - key: google-readability-function-size.StatementThreshold
  43. value: '800'
  44. - key: google-readability-namespace-comments.ShortNamespaceLines
  45. value: '10'
  46. - key: google-readability-namespace-comments.SpacesBeforeComments
  47. value: '2'
  48. - key: google-runtime-int.SignedTypePrefix
  49. value: int
  50. - key: google-runtime-int.TypeSuffix
  51. value: ''
  52. - key: google-runtime-int.UnsignedTypePrefix
  53. value: uint
  54. - key: google-runtime-references.WhiteListTypes
  55. value: ''
  56. - key: hicpp-function-size.BranchThreshold
  57. value: '4294967295'
  58. - key: hicpp-function-size.LineThreshold
  59. value: '4294967295'
  60. - key: hicpp-function-size.ParameterThreshold
  61. value: '4294967295'
  62. - key: hicpp-function-size.StatementThreshold
  63. value: '800'
  64. - key: hicpp-member-init.IgnoreArrays
  65. value: '0'
  66. - key: hicpp-named-parameter.IgnoreFailedSplit
  67. value: '0'
  68. - key: hicpp-special-member-functions.AllowMissingMoveFunctions
  69. value: '0'
  70. - key: hicpp-special-member-functions.AllowSoleDefaultDtor
  71. value: '0'
  72. - key: llvm-header-guard.HeaderFileExtensions
  73. value: ',h,hh,hpp,hxx'
  74. - key: llvm-namespace-comment.ShortNamespaceLines
  75. value: '1'
  76. - key: llvm-namespace-comment.SpacesBeforeComments
  77. value: '2'
  78. - key: misc-argument-comment.StrictMode
  79. value: '0'
  80. - key: misc-assert-side-effect.AssertMacros
  81. value: assert
  82. - key: misc-assert-side-effect.CheckFunctionCalls
  83. value: '0'
  84. - key: misc-dangling-handle.HandleClasses
  85. value: 'std::basic_string_view;std::experimental::basic_string_view'
  86. - key: misc-definitions-in-headers.HeaderFileExtensions
  87. value: ',h,hh,hpp,hxx'
  88. - key: misc-definitions-in-headers.UseHeaderFileExtension
  89. value: '1'
  90. - key: misc-misplaced-widening-cast.CheckImplicitCasts
  91. value: '0'
  92. - key: misc-move-constructor-init.IncludeStyle
  93. value: llvm
  94. - key: misc-sizeof-expression.WarnOnSizeOfCompareToConstant
  95. value: '1'
  96. - key: misc-sizeof-expression.WarnOnSizeOfConstant
  97. value: '1'
  98. - key: misc-sizeof-expression.WarnOnSizeOfThis
  99. value: '1'
  100. - key: misc-string-constructor.LargeLengthThreshold
  101. value: '8388608'
  102. - key: misc-string-constructor.WarnOnLargeLength
  103. value: '1'
  104. - key: misc-suspicious-enum-usage.StrictMode
  105. value: '0'
  106. - key: misc-suspicious-missing-comma.MaxConcatenatedTokens
  107. value: '5'
  108. - key: misc-suspicious-missing-comma.RatioThreshold
  109. value: '0.200000'
  110. - key: misc-suspicious-missing-comma.SizeThreshold
  111. value: '5'
  112. - key: misc-suspicious-string-compare.StringCompareLikeFunctions
  113. value: ''
  114. - key: misc-suspicious-string-compare.WarnOnImplicitComparison
  115. value: '1'
  116. - key: misc-suspicious-string-compare.WarnOnLogicalNotComparison
  117. value: '0'
  118. - key: misc-throw-by-value-catch-by-reference.CheckThrowTemporaries
  119. value: '1'
  120. - key: modernize-loop-convert.MaxCopySize
  121. value: '16'
  122. - key: modernize-loop-convert.MinConfidence
  123. value: reasonable
  124. - key: modernize-loop-convert.NamingStyle
  125. value: CamelCase
  126. - key: modernize-pass-by-value.IncludeStyle
  127. value: llvm
  128. - key: modernize-pass-by-value.ValuesOnly
  129. value: '0'
  130. - key: modernize-raw-string-literal.ReplaceShorterLiterals
  131. value: '0'
  132. - key: modernize-replace-auto-ptr.IncludeStyle
  133. value: llvm
  134. - key: modernize-replace-random-shuffle.IncludeStyle
  135. value: llvm
  136. - key: modernize-use-auto.RemoveStars
  137. value: '0'
  138. - key: modernize-use-default-member-init.IgnoreMacros
  139. value: '1'
  140. - key: modernize-use-default-member-init.UseAssignment
  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-nullptr.NullMacros
  151. value: 'NULL'
  152. - key: modernize-use-transparent-functors.SafeMode
  153. value: '0'
  154. - key: modernize-use-using.IgnoreMacros
  155. value: '1'
  156. - key: performance-faster-string-find.StringLikeClasses
  157. value: 'std::basic_string'
  158. - key: performance-for-range-copy.WarnOnAllAutoCopies
  159. value: '0'
  160. - key: performance-inefficient-string-concatenation.StrictMode
  161. value: '0'
  162. - key: performance-inefficient-vector-operation.VectorLikeClasses
  163. value: '::std::vector'
  164. - key: performance-type-promotion-in-math-fn.IncludeStyle
  165. value: llvm
  166. - key: performance-unnecessary-value-param.IncludeStyle
  167. value: llvm
  168. - key: readability-braces-around-statements.ShortStatementLines
  169. value: '0'
  170. - key: readability-function-size.BranchThreshold
  171. value: '4294967295'
  172. - key: readability-function-size.LineThreshold
  173. value: '4294967295'
  174. - key: readability-function-size.ParameterThreshold
  175. value: '4294967295'
  176. - key: readability-function-size.StatementThreshold
  177. value: '800'
  178. - key: readability-identifier-naming.IgnoreFailedSplit
  179. value: '0'
  180. - key: readability-implicit-bool-cast.AllowConditionalIntegerCasts
  181. value: '0'
  182. - key: readability-implicit-bool-cast.AllowConditionalPointerCasts
  183. value: '0'
  184. - key: readability-simplify-boolean-expr.ChainedConditionalAssignment
  185. value: '0'
  186. - key: readability-simplify-boolean-expr.ChainedConditionalReturn
  187. value: '0'
  188. ...