.clang-tidy 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426
  1. Checks: "*,\
  2. # not currently a coding convention, but conceivable,\
  3. -llvm-include-order,\
  4. # currently the coding convention deliberately produces violations of these,\
  5. # rules, but it may make sense to reconsider,\
  6. -readability-implicit-bool-conversion,\
  7. -readability-braces-around-statements,\
  8. -readability-named-parameter,\
  9. -fuchsia-default-arguments,\
  10. -google-readability-todo,\
  11. -google-runtime-int,\
  12. -cppcoreguidelines-avoid-goto,\
  13. -cppcoreguidelines-pro-type-member-init,\
  14. -cppcoreguidelines-pro-type-static-cast-downcast,\
  15. # not applicable\
  16. -fuchsia-default-argument-calls,\
  17. -fuchsia-overloaded-operator,\
  18. -fuchsia-statically-constructed-objects,\
  19. # not currently a coding convention, C++11-specific, but conceivable,\
  20. -modernize-use-nullptr,\
  21. -modernize-use-equals-default,\
  22. -modernize-deprecated-headers,\
  23. # not currently a coding convention, C++11-specific and hard to implement,\
  24. -hicpp-no-malloc,\
  25. -hicpp-avoid-c-arrays,\
  26. -modernize-avoid-c-arrays,\
  27. -modernize-pass-by-value,\
  28. -modernize-loop-convert,\
  29. -modernize-use-auto,\
  30. -modernize-use-trailing-return-type,\
  31. -modernize-use-using,\
  32. -modernize-return-braced-init-list,\
  33. -cppcoreguidelines-avoid-c-arrays,\
  34. -cppcoreguidelines-no-malloc,\
  35. -cppcoreguidelines-owning-memory,\
  36. -cppcoreguidelines-pro-type-union-access,\
  37. -cppcoreguidelines-pro-bounds-array-to-pointer-decay,\
  38. -cppcoreguidelines-pro-bounds-constant-array-index,\
  39. -cppcoreguidelines-pro-bounds-pointer-arithmetic,\
  40. # not easily possible to implement (maybe replace by specific exclusions),\
  41. -cppcoreguidelines-pro-type-vararg,\
  42. -cppcoreguidelines-pro-type-reinterpret-cast,\
  43. -hicpp-signed-bitwise,\
  44. # duplicates,\
  45. -google-readability-braces-around-statements,\
  46. -cppcoreguidelines-pro-type-cstyle-cast,\
  47. -cppcoreguidelines-avoid-magic-numbers,\
  48. -hicpp-braces-around-statements,\
  49. -hicpp-use-equals-default,\
  50. -hicpp-deprecated-headers,\
  51. -hicpp-no-assembler,\
  52. -hicpp-vararg,\
  53. -hicpp-use-auto,\
  54. -hicpp-use-nullptr,\
  55. -hicpp-no-array-decay,\
  56. -hicpp-member-init"
  57. WarningsAsErrors: ''
  58. HeaderFilterRegex: ''
  59. # AnalyzeTemporaryDtors: false
  60. CheckOptions:
  61. # - key: cert-dcl59-cpp.HeaderFileExtensions
  62. # value: h,hh,hpp,hxx
  63. # - key: cert-err61-cpp.CheckThrowTemporaries
  64. # value: '1'
  65. # - key: cert-oop11-cpp.IncludeStyle
  66. # value: llvm
  67. # - key: cert-oop11-cpp.UseCERTSemantics
  68. # value: '1'
  69. # - key: cppcoreguidelines-pro-bounds-constant-array-index.GslHeader
  70. # value: ''
  71. # - key: cppcoreguidelines-pro-bounds-constant-array-index.IncludeStyle
  72. # value: '0'
  73. # - key: cppcoreguidelines-pro-type-member-init.IgnoreArrays
  74. # value: '0'
  75. # - key: google-build-namespaces.HeaderFileExtensions
  76. # value: h,hh,hpp,hxx
  77. # - key: google-global-names-in-headers.HeaderFileExtensions
  78. # value: h
  79. # - key: google-readability-braces-around-statements.ShortStatementLines
  80. # value: '1'
  81. # - key: google-readability-function-size.BranchThreshold
  82. # value: '4294967295'
  83. # - key: google-readability-function-size.LineThreshold
  84. # value: '4294967295'
  85. # - key: google-readability-function-size.StatementThreshold
  86. # value: '800'
  87. # - key: google-readability-namespace-comments.ShortNamespaceLines
  88. # value: '10'
  89. # - key: google-readability-namespace-comments.SpacesBeforeComments
  90. # value: '2'
  91. # - key: google-runtime-int.SignedTypePrefix
  92. # value: int
  93. # - key: google-runtime-int.TypeSuffix
  94. # value: ''
  95. # - key: google-runtime-int.UnsignedTypePrefix
  96. # value: uint
  97. # - key: llvm-namespace-comment.ShortNamespaceLines
  98. # value: '1'
  99. # - key: llvm-namespace-comment.SpacesBeforeComments
  100. # value: '1'
  101. # - key: misc-assert-side-effect.AssertMacros
  102. # value: assert
  103. # - key: misc-assert-side-effect.CheckFunctionCalls
  104. # value: '0'
  105. # - key: misc-dangling-handle.HandleClasses
  106. # value: 'std::basic_string_view;std::experimental::basic_string_view'
  107. # - key: misc-definitions-in-headers.HeaderFileExtensions
  108. # value: ',h,hh,hpp,hxx'
  109. # - key: misc-definitions-in-headers.UseHeaderFileExtension
  110. # value: '1'
  111. # - key: misc-misplaced-widening-cast.CheckImplicitCasts
  112. # value: '1'
  113. # - key: misc-move-constructor-init.IncludeStyle
  114. # value: llvm
  115. # - key: misc-move-constructor-init.UseCERTSemantics
  116. # value: '0'
  117. # - key: misc-sizeof-expression.WarnOnSizeOfCompareToConstant
  118. # value: '1'
  119. # - key: misc-sizeof-expression.WarnOnSizeOfConstant
  120. # value: '1'
  121. # - key: misc-sizeof-expression.WarnOnSizeOfThis
  122. # value: '1'
  123. # - key: misc-string-constructor.LargeLengthThreshold
  124. # value: '8388608'
  125. # - key: misc-string-constructor.WarnOnLargeLength
  126. # value: '1'
  127. # - key: misc-suspicious-missing-comma.MaxConcatenatedTokens
  128. # value: '5'
  129. # - key: misc-suspicious-missing-comma.RatioThreshold
  130. # value: '0.200000'
  131. # - key: misc-suspicious-missing-comma.SizeThreshold
  132. # value: '5'
  133. # - key: misc-suspicious-string-compare.StringCompareLikeFunctions
  134. # value: ''
  135. # - key: misc-suspicious-string-compare.WarnOnImplicitComparison
  136. # value: '1'
  137. # - key: misc-suspicious-string-compare.WarnOnLogicalNotComparison
  138. # value: '0'
  139. # - key: misc-throw-by-value-catch-by-reference.CheckThrowTemporaries
  140. # value: '1'
  141. # - key: modernize-loop-convert.MaxCopySize
  142. # value: '16'
  143. # - key: modernize-loop-convert.MinConfidence
  144. # value: reasonable
  145. # - key: modernize-loop-convert.NamingStyle
  146. # value: CamelCase
  147. # - key: modernize-pass-by-value.IncludeStyle
  148. # value: llvm
  149. # - key: modernize-replace-auto-ptr.IncludeStyle
  150. # value: llvm
  151. # - key: modernize-use-nullptr.NullMacros
  152. # value: 'NULL'
  153. # - key: performance-faster-string-find.StringLikeClasses
  154. # value: 'std::basic_string'
  155. # - key: performance-for-range-copy.WarnOnAllAutoCopies
  156. # value: '0'
  157. # - key: readability-braces-around-statements.ShortStatementLines
  158. # value: '1'
  159. # - key: readability-function-size.BranchThreshold
  160. # value: '4294967295'
  161. # - key: readability-function-size.LineThreshold
  162. # value: '4294967295'
  163. # - key: readability-function-size.StatementThreshold
  164. # value: '800'
  165. # - key: readability-identifier-naming.AbstractClassCase
  166. # value: aNy_CasE
  167. # - key: readability-identifier-naming.AbstractClassPrefix
  168. # value: ''
  169. # - key: readability-identifier-naming.AbstractClassSuffix
  170. # value: ''
  171. # - key: readability-identifier-naming.ClassCase
  172. # value: aNy_CasE
  173. # - key: readability-identifier-naming.ClassConstantCase
  174. # value: aNy_CasE
  175. # - key: readability-identifier-naming.ClassConstantPrefix
  176. # value: ''
  177. # - key: readability-identifier-naming.ClassConstantSuffix
  178. # value: ''
  179. # - key: readability-identifier-naming.ClassMemberCase
  180. # value: aNy_CasE
  181. # - key: readability-identifier-naming.ClassMemberPrefix
  182. # value: ''
  183. # - key: readability-identifier-naming.ClassMemberSuffix
  184. # value: ''
  185. # - key: readability-identifier-naming.ClassMethodCase
  186. # value: aNy_CasE
  187. # - key: readability-identifier-naming.ClassMethodPrefix
  188. # value: ''
  189. # - key: readability-identifier-naming.ClassMethodSuffix
  190. # value: ''
  191. # - key: readability-identifier-naming.ClassPrefix
  192. # value: ''
  193. # - key: readability-identifier-naming.ClassSuffix
  194. # value: ''
  195. # - key: readability-identifier-naming.ConstantCase
  196. # value: aNy_CasE
  197. # - key: readability-identifier-naming.ConstantMemberCase
  198. # value: aNy_CasE
  199. # - key: readability-identifier-naming.ConstantMemberPrefix
  200. # value: ''
  201. # - key: readability-identifier-naming.ConstantMemberSuffix
  202. # value: ''
  203. # - key: readability-identifier-naming.ConstantParameterCase
  204. # value: aNy_CasE
  205. # - key: readability-identifier-naming.ConstantParameterPrefix
  206. # value: ''
  207. # - key: readability-identifier-naming.ConstantParameterSuffix
  208. # value: ''
  209. # - key: readability-identifier-naming.ConstantPrefix
  210. # value: ''
  211. # - key: readability-identifier-naming.ConstantSuffix
  212. # value: ''
  213. # - key: readability-identifier-naming.ConstexprFunctionCase
  214. # value: aNy_CasE
  215. # - key: readability-identifier-naming.ConstexprFunctionPrefix
  216. # value: ''
  217. # - key: readability-identifier-naming.ConstexprFunctionSuffix
  218. # value: ''
  219. # - key: readability-identifier-naming.ConstexprMethodCase
  220. # value: aNy_CasE
  221. # - key: readability-identifier-naming.ConstexprMethodPrefix
  222. # value: ''
  223. # - key: readability-identifier-naming.ConstexprMethodSuffix
  224. # value: ''
  225. # - key: readability-identifier-naming.ConstexprVariableCase
  226. # value: aNy_CasE
  227. # - key: readability-identifier-naming.ConstexprVariablePrefix
  228. # value: ''
  229. # - key: readability-identifier-naming.ConstexprVariableSuffix
  230. # value: ''
  231. # - key: readability-identifier-naming.EnumCase
  232. # value: aNy_CasE
  233. # - key: readability-identifier-naming.EnumConstantCase
  234. # value: aNy_CasE
  235. # - key: readability-identifier-naming.EnumConstantPrefix
  236. # value: ''
  237. # - key: readability-identifier-naming.EnumConstantSuffix
  238. # value: ''
  239. # - key: readability-identifier-naming.EnumPrefix
  240. # value: ''
  241. # - key: readability-identifier-naming.EnumSuffix
  242. # value: ''
  243. # - key: readability-identifier-naming.FunctionCase
  244. # value: aNy_CasE
  245. # - key: readability-identifier-naming.FunctionPrefix
  246. # value: ''
  247. # - key: readability-identifier-naming.FunctionSuffix
  248. # value: ''
  249. # - key: readability-identifier-naming.GlobalConstantCase
  250. # value: aNy_CasE
  251. # - key: readability-identifier-naming.GlobalConstantPrefix
  252. # value: ''
  253. # - key: readability-identifier-naming.GlobalConstantSuffix
  254. # value: ''
  255. # - key: readability-identifier-naming.GlobalFunctionCase
  256. # value: aNy_CasE
  257. # - key: readability-identifier-naming.GlobalFunctionPrefix
  258. # value: ''
  259. # - key: readability-identifier-naming.GlobalFunctionSuffix
  260. # value: ''
  261. # - key: readability-identifier-naming.GlobalVariableCase
  262. # value: aNy_CasE
  263. # - key: readability-identifier-naming.GlobalVariablePrefix
  264. # value: ''
  265. # - key: readability-identifier-naming.GlobalVariableSuffix
  266. # value: ''
  267. # - key: readability-identifier-naming.IgnoreFailedSplit
  268. # value: '0'
  269. # - key: readability-identifier-naming.InlineNamespaceCase
  270. # value: aNy_CasE
  271. # - key: readability-identifier-naming.InlineNamespacePrefix
  272. # value: ''
  273. # - key: readability-identifier-naming.InlineNamespaceSuffix
  274. # value: ''
  275. - key: readability-identifier-naming.LocalConstantCase
  276. value: lower_case
  277. - key: readability-identifier-naming.LocalConstantPrefix
  278. value: ''
  279. - key: readability-identifier-naming.LocalConstantSuffix
  280. value: ''
  281. - key: readability-identifier-naming.LocalVariableCase
  282. value: lower_case
  283. - key: readability-identifier-naming.LocalVariablePrefix
  284. value: ''
  285. - key: readability-identifier-naming.LocalVariableSuffix
  286. value: ''
  287. # - key: readability-identifier-naming.MemberCase
  288. # value: lower_case
  289. # - key: readability-identifier-naming.MemberPrefix
  290. # value: '_'
  291. # - key: readability-identifier-naming.MemberSuffix
  292. # value: ''
  293. # - key: readability-identifier-naming.MethodCase
  294. # value: aNy_CasE
  295. # - key: readability-identifier-naming.MethodPrefix
  296. # value: ''
  297. # - key: readability-identifier-naming.MethodSuffix
  298. # value: ''
  299. # - key: readability-identifier-naming.NamespaceCase
  300. # value: aNy_CasE
  301. # - key: readability-identifier-naming.NamespacePrefix
  302. # value: ''
  303. # - key: readability-identifier-naming.NamespaceSuffix
  304. # value: ''
  305. - key: readability-identifier-naming.ParameterCase
  306. value: lower_case
  307. # - key: readability-identifier-naming.ParameterPackCase
  308. # value: aNy_CasE
  309. # - key: readability-identifier-naming.ParameterPackPrefix
  310. # value: ''
  311. # - key: readability-identifier-naming.ParameterPackSuffix
  312. # value: ''
  313. # - key: readability-identifier-naming.ParameterPrefix
  314. # value: ''
  315. - key: readability-identifier-naming.ParameterSuffix
  316. value: '_'
  317. - key: readability-identifier-naming.PrivateMemberCase
  318. value: lower_case
  319. - key: readability-identifier-naming.PrivateMemberPrefix
  320. value: '_'
  321. - key: readability-identifier-naming.PrivateMemberSuffix
  322. value: ''
  323. # - key: readability-identifier-naming.PrivateMethodCase
  324. # value: aNy_CasE
  325. # - key: readability-identifier-naming.PrivateMethodPrefix
  326. # value: ''
  327. # - key: readability-identifier-naming.PrivateMethodSuffix
  328. # value: ''
  329. # - key: readability-identifier-naming.ProtectedMemberCase
  330. # value: aNy_CasE
  331. # - key: readability-identifier-naming.ProtectedMemberPrefix
  332. # value: ''
  333. # - key: readability-identifier-naming.ProtectedMemberSuffix
  334. # value: ''
  335. # - key: readability-identifier-naming.ProtectedMethodCase
  336. # value: aNy_CasE
  337. # - key: readability-identifier-naming.ProtectedMethodPrefix
  338. # value: ''
  339. # - key: readability-identifier-naming.ProtectedMethodSuffix
  340. # value: ''
  341. # - key: readability-identifier-naming.PublicMemberCase
  342. # value: aNy_CasE
  343. # - key: readability-identifier-naming.PublicMemberPrefix
  344. # value: ''
  345. # - key: readability-identifier-naming.PublicMemberSuffix
  346. # value: ''
  347. # - key: readability-identifier-naming.PublicMethodCase
  348. # value: aNy_CasE
  349. # - key: readability-identifier-naming.PublicMethodPrefix
  350. # value: ''
  351. # - key: readability-identifier-naming.PublicMethodSuffix
  352. # value: ''
  353. # - key: readability-identifier-naming.StaticConstantCase
  354. # value: aNy_CasE
  355. # - key: readability-identifier-naming.StaticConstantPrefix
  356. # value: ''
  357. # - key: readability-identifier-naming.StaticConstantSuffix
  358. # value: ''
  359. # - key: readability-identifier-naming.StaticVariableCase
  360. # value: aNy_CasE
  361. # - key: readability-identifier-naming.StaticVariablePrefix
  362. # value: ''
  363. # - key: readability-identifier-naming.StaticVariableSuffix
  364. # value: ''
  365. # - key: readability-identifier-naming.StructCase
  366. # value: aNy_CasE
  367. # - key: readability-identifier-naming.StructPrefix
  368. # value: ''
  369. # - key: readability-identifier-naming.StructSuffix
  370. # value: ''
  371. # - key: readability-identifier-naming.TemplateParameterCase
  372. # value: aNy_CasE
  373. # - key: readability-identifier-naming.TemplateParameterPrefix
  374. # value: ''
  375. # - key: readability-identifier-naming.TemplateParameterSuffix
  376. # value: ''
  377. # - key: readability-identifier-naming.TemplateTemplateParameterCase
  378. # value: aNy_CasE
  379. # - key: readability-identifier-naming.TemplateTemplateParameterPrefix
  380. # value: ''
  381. # - key: readability-identifier-naming.TemplateTemplateParameterSuffix
  382. # value: ''
  383. # - key: readability-identifier-naming.TypeTemplateParameterCase
  384. # value: aNy_CasE
  385. # - key: readability-identifier-naming.TypeTemplateParameterPrefix
  386. # value: ''
  387. # - key: readability-identifier-naming.TypeTemplateParameterSuffix
  388. # value: ''
  389. # - key: readability-identifier-naming.TypedefCase
  390. # value: aNy_CasE
  391. # - key: readability-identifier-naming.TypedefPrefix
  392. # value: ''
  393. # - key: readability-identifier-naming.TypedefSuffix
  394. # value: ''
  395. # - key: readability-identifier-naming.UnionCase
  396. # value: aNy_CasE
  397. # - key: readability-identifier-naming.UnionPrefix
  398. # value: ''
  399. # - key: readability-identifier-naming.UnionSuffix
  400. # value: ''
  401. # - key: readability-identifier-naming.ValueTemplateParameterCase
  402. # value: aNy_CasE
  403. # - key: readability-identifier-naming.ValueTemplateParameterPrefix
  404. # value: ''
  405. # - key: readability-identifier-naming.ValueTemplateParameterSuffix
  406. # value: ''
  407. # - key: readability-identifier-naming.VariableCase
  408. # value: aNy_CasE
  409. # - key: readability-identifier-naming.VariablePrefix
  410. # value: ''
  411. # - key: readability-identifier-naming.VariableSuffix
  412. # value: ''
  413. # - key: readability-identifier-naming.VirtualMethodCase
  414. # value: aNy_CasE
  415. # - key: readability-identifier-naming.VirtualMethodPrefix
  416. # value: ''
  417. # - key: readability-identifier-naming.VirtualMethodSuffix
  418. # value: ''
  419. # - key: readability-simplify-boolean-expr.ChainedConditionalAssignment
  420. # value: '0'
  421. # - key: readability-simplify-boolean-expr.ChainedConditionalReturn
  422. # value: '0'
  423. - key: modernize-use-override.OverrideSpelling
  424. value: 'ZMQ_OVERRIDE'
  425. - key: modernize-use-override.FinalSpelling
  426. value: 'ZMQ_FINAL'