.clang-tidy 1.3 KB

12345678910111213141516171819202122232425262728293031323334
  1. # Disable the following checks due to frequent false positives, noisiness,
  2. # inconsistent style with existing codebase and other reasons:
  3. # -misc-non-private-member-variables-in-classes (potentially too restrictive)
  4. # -misc-unused-parameters (can be cleaned up in batch and enabled)
  5. # -modernize-avoid-c-arrays (too restrictive)
  6. # -modernize-pass-by-value (too restrictive)
  7. # -modernize-return-braced-init-list (inconsistent style)
  8. # -modernize-use-emplace (more subtle behavior)
  9. # -modernize-use-trailing-return-type (inconsistent style)
  10. #
  11. # TODO: enable google-* and readability-* families of checks.
  12. Checks: >
  13. abseil-*,
  14. bugprone-*,
  15. misc-*,
  16. -misc-non-private-member-variables-in-classes,
  17. -misc-unused-parameters,
  18. modernize-*,
  19. -modernize-avoid-c-arrays,
  20. -modernize-pass-by-value,
  21. -modernize-return-braced-init-list,
  22. -modernize-use-emplace,
  23. -modernize-use-trailing-return-type,
  24. performance-*,
  25. CheckOptions:
  26. # Reduce noisiness of the bugprone-narrowing-conversions check.
  27. - key: bugprone-narrowing-conversions.IgnoreConversionFromTypes
  28. value: 'size_t;ptrdiff_t;size_type;difference_type'
  29. - key: bugprone-narrowing-conversions.WarnOnEquivalentBitWidth
  30. value: 'false'
  31. # Turn all the warnings from the checks above into errors.
  32. WarningsAsErrors: "*"