.clang-tidy 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. # Exceptions. See /LICENSE for license information.
  3. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. ---
  5. # - modernize-use-nodiscard is disabled because it only fixes const methods,
  6. # not non-const, which yields distracting results on accessors.
  7. # - performance-unnecessary-value-param is disabled because it duplicate
  8. # modernize-pass-by-value.
  9. Checks:
  10. -*, bugprone-*, -bugprone-easily-swappable-parameters,
  11. -bugprone-narrowing-conversions, google-*, -google-readability-todo,
  12. misc-definitions-in-headers, misc-misplaced-const, misc-redundant-expression,
  13. misc-static-assert, misc-unconventional-assign-operator,
  14. misc-uniqueptr-reset-release, misc-unused-*, modernize-*,
  15. -modernize-avoid-c-arrays, -modernize-return-braced-init-list,
  16. -modernize-use-default-member-init, -modernize-use-emplace,
  17. -modernize-use-nodiscard, performance-*, -performance-unnecessary-value-param,
  18. readability-braces-around-statements, readability-identifier-naming
  19. WarningsAsErrors: true
  20. CheckOptions:
  21. - { key: readability-identifier-naming.ClassCase, value: CamelCase }
  22. - {
  23. key: readability-identifier-naming.ConstexprVariableCase,
  24. value: CamelCase,
  25. }
  26. - { key: readability-identifier-naming.NamespaceCase, value: CamelCase }
  27. - { key: readability-identifier-naming.StructCase, value: CamelCase }
  28. - {
  29. key: readability-identifier-naming.TemplateParameterCase,
  30. value: CamelCase,
  31. }
  32. - { key: readability-identifier-naming.TypeAliasCase, value: CamelCase }
  33. - { key: readability-identifier-naming.TypedefCase, value: CamelCase }
  34. - { key: readability-identifier-naming.UnionCase, value: CamelCase }
  35. - { key: readability-identifier-naming.VariableCase, value: lower_case }
  36. - { key: readability-identifier-naming.ParameterCase, value: lower_case }
  37. - { key: readability-identifier-naming.ClassMemberCase, value: lower_case }
  38. - {
  39. key: readability-identifier-naming.MethodIgnoredRegexp,
  40. value: '^classof$',
  41. }