.clang-tidy 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. ---
  2. # Globally Disabled checks:
  3. #
  4. # bugprone-easily-swappable-parameters: This warning is loud with no clear advice on how to fix the potential problem
  5. # FIXME: bugprone-macro-parentheses: Enable with clang-tidy-14 when NOLINTBEGIN/NOLINTEND are available for code generating macros
  6. # bugprone-reserved-identifier: LibC headers that show up in the header filter are part of "the implementation"
  7. # cert-dcl37-c: Alias for bugprone-reserved-identifier
  8. # cert-dcl51-cpp: Alias for bugprone-reserved-identifier
  9. # cert-dcl21-cpp: No reference to this rule exists on Carnegie Mellon's SEI CERT C++ Confluence. And the suggestion is unusual
  10. # misc-no-recursion: The project uses recursive algorithms in several places.
  11. # misc-include-cleaner: This check is nice for cleanliness, but is very very noisy
  12. # FIXME: misc-non-private-member-variables-in-classes: Audit uses of protected member variables to see if they really need to be protected
  13. # performance-noexcept-move-constructor: The project does not use exceptions, so there are no such optimizations available
  14. # performance-no-int-to-ptr: This rule flags every pointer to integer cast, which gets quite noisy. Should only be enabled on a case-by-case basis
  15. # readability-braces-around-statements: Redundant braces around single-line conditions is against project style
  16. # readability-function-cognitive-complexity: Most regular contributors seem to turn this one off anyway. Violations are hard to fix as well
  17. # readability-magic-numbers: This check is very noisy in the codebase, especially in AK.
  18. # readability-named-parameter: We frequently omit parameter names to work around -Wunused-parameter
  19. # FIXME: readability-uppercase-literal-suffix: Enable this check, the rationale is solid but the findings are numerous
  20. #
  21. Checks: >
  22. -*,
  23. bugprone-*,
  24. cert-*,
  25. clang-analyzer-*,
  26. concurrency-*,
  27. misc-*,
  28. performance-*,
  29. portability-*,
  30. readability-*,
  31. -bugprone-easily-swappable-parameters,
  32. -bugprone-macro-parentheses,
  33. -bugprone-reserved-identifier,-cert-dcl37-c,-cert-dcl51-cpp,
  34. -cert-dcl21-cpp,
  35. -misc-include-cleaner,
  36. -misc-no-recursion,
  37. -misc-non-private-member-variables-in-classes,
  38. -misc-use-anonymous-namespace,
  39. -performance-noexcept-move-constructor,
  40. -performance-no-int-to-ptr,
  41. -readability-braces-around-statements,
  42. -readability-function-cognitive-complexity,
  43. -readability-identifier-length,
  44. -readability-magic-numbers,
  45. -readability-named-parameter,
  46. -readability-uppercase-literal-suffix,
  47. -readability-use-anyofallof,
  48. WarningsAsErrors: ''
  49. HeaderFilterRegex: 'AK|Userland|Tests'
  50. FormatStyle: none
  51. CheckOptions:
  52. - key: bugprone-dangling-handle.HandleClasses
  53. value: 'AK::StringView;AK::Span'
  54. - key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
  55. value: true
  56. - key: readability-implicit-bool-conversion.AllowPointerConditions
  57. value: true