.clang-tidy 4.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. # Enabled, but situational - a lot of triggers in old code:
  2. # -bugprone-narrowing-conversions, # might be too noisy
  3. # -cppcoreguidelines-narrowing-conversions, # might be too noisy
  4. # -cppcoreguidelines-pro-bounds-pointer-arithmetic, # pointer arithmetic should be avoided, with possible exception for low-level reader classes
  5. # -misc-private-member-variables-in-classes, # good for classes, should be disabled/ignored for structs
  6. # -readability-function-cognitive-complexity, # can show candidates for refactoring
  7. #
  8. # Currently disabled options:
  9. # -misc-unused-parameters, # a lot of intended cases, e.g. interfaces & their implementations
  10. # -misc-include-cleaner, # a lot of false-positives, mostly due to StdInc.h
  11. # -cppcoreguidelines-init-variables, # better to rely on "maybe initialized" compiler warnings
  12. # -cppcoreguidelines-owning-memory, # requires 'gsl' library presence
  13. # -cppcoreguidelines-avoid-magic-numbers, # too much noise
  14. # -readability-identifier-length, # too much noise
  15. # -readability-magic-numbers, # too much noise
  16. # -bugprone-easily-swappable-parameters, # improvement doubtful
  17. # -cppcoreguidelines-avoid-const-or-ref-data-members # improvement doubtful
  18. # -cppcoreguidelines-special-member-functions, # improvement doubtful
  19. # -cppcoreguidelines-pro-bounds-constant-array-index, # improvement doubtful
  20. # -readability-static-accessed-through-instance, # improvement doubtful
  21. # -readability-else-after-return, # improvement doubtful
  22. # -modernize-pass-by-value, # improvement doubtful
  23. # -google-readability-braces-around-statements, # not in our code style
  24. # -google-readability-namespace-comments, # not in our code style
  25. # -google-readability-todo, # not in our code style
  26. # -modernize-use-trailing-return-type, # not in our code style
  27. # -modernize-return-braced-init-list, # not in our code style
  28. # -modernize-use-nodiscard, # not in our code style
  29. # -readability-braces-around-statements, # not in our code style
  30. # -readability-implicit-bool-conversion, # not in our code style for pointers, and int-only detection seems to be broken?
  31. # -readability-uppercase-literal-suffix # not in our code style
  32. # -readability-convert-member-functions-to-static, # candidate for re-enabling, to show poorly designed class methods
  33. Checks: >
  34. -*,
  35. boost-*,
  36. bugprone-*,
  37. clang-*,
  38. cppcoreguidelines-*,
  39. google-*,
  40. misc-*,
  41. modernize-*,
  42. performance-*,
  43. readability-*,
  44. -bugprone-easily-swappable-parameters,
  45. -cppcoreguidelines-avoid-const-or-ref-data-members,
  46. -cppcoreguidelines-avoid-magic-numbers,
  47. -cppcoreguidelines-init-variables,
  48. -cppcoreguidelines-owning-memory,
  49. -cppcoreguidelines-special-member-functions,
  50. -cppcoreguidelines-pro-bounds-constant-array-index,
  51. -google-readability-braces-around-statements,
  52. -google-readability-namespace-comments,
  53. -google-readability-todo,
  54. -misc-include-cleaner,
  55. -misc-unused-parameters,
  56. -modernize-use-trailing-return-type,
  57. -modernize-return-braced-init-list,
  58. -modernize-pass-by-value,
  59. -modernize-use-nodiscard,
  60. -readability-braces-around-statements,
  61. -readability-convert-member-functions-to-static,
  62. -readability-else-after-return,
  63. -readability-identifier-length,
  64. -readability-implicit-bool-conversion,
  65. -readability-magic-numbers,
  66. -readability-static-accessed-through-instance,
  67. -readability-uppercase-literal-suffix,
  68. -readability-use-anyofallof
  69. CheckOptions:
  70. - key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
  71. value: 'true'
  72. - key: llvm-else-after-return.WarnOnConditionVariables
  73. value: 'false'
  74. - key: misc-const-correctness.AnalyzeValues
  75. value: 'false'
  76. - key: misc-include-cleaner.IgnoreHeaders
  77. value: 'StdInc.h'
  78. - key: readability-function-size.StatementThreshold
  79. value: '800'
  80. - key: misc-include-cleaner.IgnoreHeaders
  81. value: 'StdInc.h'