build: tell clang-tidy to suggest uppercase literal suffixes (#7529)

This commit is contained in:
Yat Ho
2025-05-07 05:07:43 +08:00
committed by GitHub
parent c215de34d5
commit adea0e2a07
4 changed files with 38 additions and 34 deletions

View File

@@ -28,3 +28,4 @@ CheckOptions:
- { key: cppcoreguidelines-avoid-do-while.IgnoreMacros, value: true } - { key: cppcoreguidelines-avoid-do-while.IgnoreMacros, value: true }
- { key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic, value: true } - { key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic, value: true }
- { key: modernize-pass-by-value.ValuesOnly, value: true } - { key: modernize-pass-by-value.ValuesOnly, value: true }
- { key: readability-implicit-bool-conversion.UseUpperCaseLiteralSuffix, value: true }

View File

@@ -39,8 +39,9 @@ Checks: >
-readability-qualified-auto, -readability-qualified-auto,
CheckOptions: CheckOptions:
- { key: cppcoreguidelines-avoid-do-while.IgnoreMacros, value: true } - { key: cppcoreguidelines-avoid-do-while.IgnoreMacros, value: true }
- { key: readability-identifier-naming.ConstexprVariableCase, value: CamelCase } - { key: readability-identifier-naming.ConstexprVariableCase, value: CamelCase }
- { key: readability-identifier-naming.ParameterCase, value: lower_case } - { key: readability-identifier-naming.ParameterCase, value: lower_case }
- { key: readability-identifier-naming.VariableCase, value: lower_case } - { key: readability-identifier-naming.VariableCase, value: lower_case }
- { key: readability-implicit-bool-conversion.UseUpperCaseLiteralSuffix, value: true }

View File

@@ -39,18 +39,19 @@ Checks: >
-readability-redundant-access-specifiers, # keep: 'private' vs 'private slots' -readability-redundant-access-specifiers, # keep: 'private' vs 'private slots'
CheckOptions: CheckOptions:
- { key: cppcoreguidelines-avoid-do-while.IgnoreMacros, value: true } - { key: cppcoreguidelines-avoid-do-while.IgnoreMacros, value: true }
- { key: readability-identifier-naming.ClassCase, value: CamelCase } - { key: readability-identifier-naming.ClassCase, value: CamelCase }
- { key: readability-identifier-naming.ClassMethodCase, value: camelBack } - { key: readability-identifier-naming.ClassMethodCase, value: camelBack }
- { key: readability-identifier-naming.ConstexprVariableCase, value: CamelCase } - { key: readability-identifier-naming.ConstexprVariableCase, value: CamelCase }
- { key: readability-identifier-naming.EnumConstantCase, value: UPPER_CASE } - { key: readability-identifier-naming.EnumConstantCase, value: UPPER_CASE }
- { key: readability-identifier-naming.FunctionCase, value: camelBack } - { key: readability-identifier-naming.FunctionCase, value: camelBack }
- { key: readability-identifier-naming.GlobalConstantCase, value: CamelCase } - { key: readability-identifier-naming.GlobalConstantCase, value: CamelCase }
- { key: readability-identifier-naming.MemberConstantCase, value: CamelCase } - { key: readability-identifier-naming.MemberConstantCase, value: CamelCase }
- { key: readability-identifier-naming.NamespaceCase, value: lower_case } - { key: readability-identifier-naming.NamespaceCase, value: lower_case }
- { key: readability-identifier-naming.PrivateMemberSuffix, value: _ } - { key: readability-identifier-naming.PrivateMemberSuffix, value: _ }
- { key: readability-identifier-naming.ProtectedMemberSuffix, value: _ } - { key: readability-identifier-naming.ProtectedMemberSuffix, value: _ }
- { key: readability-identifier-naming.StaticConstantCase, value: CamelCase } - { key: readability-identifier-naming.StaticConstantCase, value: CamelCase }
- { key: readability-identifier-naming.StructCase, value: CamelCase } - { key: readability-identifier-naming.StructCase, value: CamelCase }
- { key: readability-identifier-naming.TemplateParameterCase, value: CamelCase } - { key: readability-identifier-naming.TemplateParameterCase, value: CamelCase }
- { key: readability-identifier-naming.VariableCase, value: lower_case } - { key: readability-identifier-naming.VariableCase, value: lower_case }
- { key: readability-implicit-bool-conversion.UseUpperCaseLiteralSuffix, value: true }

View File

@@ -35,18 +35,19 @@ Checks: >
-readability-qualified-auto, -readability-qualified-auto,
CheckOptions: CheckOptions:
- { key: cppcoreguidelines-avoid-do-while.IgnoreMacros, value: true } - { key: cppcoreguidelines-avoid-do-while.IgnoreMacros, value: true }
- { key: readability-identifier-naming.ClassCase, value: CamelCase } - { key: readability-identifier-naming.ClassCase, value: CamelCase }
- { key: readability-identifier-naming.ClassMethodCase, value: camelBack } - { key: readability-identifier-naming.ClassMethodCase, value: camelBack }
- { key: readability-identifier-naming.ConstexprVariableCase, value: CamelCase } - { key: readability-identifier-naming.ConstexprVariableCase, value: CamelCase }
- { key: readability-identifier-naming.EnumConstantCase, value: UPPER_CASE } - { key: readability-identifier-naming.EnumConstantCase, value: UPPER_CASE }
- { key: readability-identifier-naming.FunctionCase, value: camelBack } - { key: readability-identifier-naming.FunctionCase, value: camelBack }
- { key: readability-identifier-naming.GlobalConstantCase, value: CamelCase } - { key: readability-identifier-naming.GlobalConstantCase, value: CamelCase }
- { key: readability-identifier-naming.MemberConstantCase, value: CamelCase } - { key: readability-identifier-naming.MemberConstantCase, value: CamelCase }
- { key: readability-identifier-naming.NamespaceCase, value: lower_case } - { key: readability-identifier-naming.NamespaceCase, value: lower_case }
- { key: readability-identifier-naming.PrivateMemberSuffix, value: _ } - { key: readability-identifier-naming.PrivateMemberSuffix, value: _ }
- { key: readability-identifier-naming.ProtectedMemberSuffix, value: _ } - { key: readability-identifier-naming.ProtectedMemberSuffix, value: _ }
- { key: readability-identifier-naming.StaticConstantCase, value: CamelCase } - { key: readability-identifier-naming.StaticConstantCase, value: CamelCase }
- { key: readability-identifier-naming.StructCase, value: CamelCase } - { key: readability-identifier-naming.StructCase, value: CamelCase }
- { key: readability-identifier-naming.TemplateParameterCase, value: CamelCase } - { key: readability-identifier-naming.TemplateParameterCase, value: CamelCase }
- { key: readability-identifier-naming.VariableCase, value: lower_case } - { key: readability-identifier-naming.VariableCase, value: lower_case }
- { key: readability-implicit-bool-conversion.UseUpperCaseLiteralSuffix, value: true }