65 lines
3.1 KiB
YAML
65 lines
3.1 KiB
YAML
---
|
|
# C++ Core Guidelines style (CppCoreGuidelines)
|
|
Checks: >
|
|
cppcoreguidelines-*,
|
|
readability-identifier-naming,
|
|
readability-*,
|
|
modernize-*,
|
|
performance-*,
|
|
bugprone-*,
|
|
-modernize-use-trailing-return-type,
|
|
-readability-magic-numbers,
|
|
-cppcoreguidelines-avoid-magic-numbers,
|
|
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
|
|
-cppcoreguidelines-pro-type-reinterpret-cast
|
|
|
|
CheckOptions:
|
|
# C++ Core Guidelines: Types use PascalCase
|
|
- { key: readability-identifier-naming.ClassCase, value: CamelCase }
|
|
- { key: readability-identifier-naming.StructCase, value: CamelCase }
|
|
- { key: readability-identifier-naming.EnumCase, value: CamelCase }
|
|
- { key: readability-identifier-naming.UnionCase, value: CamelCase }
|
|
|
|
# C++ Core Guidelines: Functions use snake_case (STL style)
|
|
- { key: readability-identifier-naming.FunctionCase, value: lower_case }
|
|
- { key: readability-identifier-naming.MethodCase, value: lower_case }
|
|
|
|
# Member variables: snake_case with trailing underscore
|
|
- { key: readability-identifier-naming.PrivateMemberCase, value: lower_case }
|
|
- { key: readability-identifier-naming.PrivateMemberSuffix, value: '_' }
|
|
- { key: readability-identifier-naming.ProtectedMemberCase, value: lower_case }
|
|
- { key: readability-identifier-naming.ProtectedMemberSuffix, value: '_' }
|
|
- { key: readability-identifier-naming.PublicMemberCase, value: lower_case }
|
|
|
|
# Parameters and local variables: snake_case
|
|
- { key: readability-identifier-naming.ParameterCase, value: lower_case }
|
|
- { key: readability-identifier-naming.VariableCase, value: lower_case }
|
|
- { key: readability-identifier-naming.LocalVariableCase, value: lower_case }
|
|
|
|
# Constants and macros: UPPER_CASE
|
|
- { key: readability-identifier-naming.ConstantCase, value: UPPER_CASE }
|
|
- { key: readability-identifier-naming.ConstexprVariableCase, value: UPPER_CASE }
|
|
- { key: readability-identifier-naming.MacroDefinitionCase, value: UPPER_CASE }
|
|
- { key: readability-identifier-naming.EnumConstantCase, value: UPPER_CASE }
|
|
|
|
# Global variables: snake_case (Core Guidelines: avoid globals when possible)
|
|
- { key: readability-identifier-naming.GlobalVariableCase, value: lower_case }
|
|
|
|
# Namespaces: snake_case
|
|
- { key: readability-identifier-naming.NamespaceCase, value: lower_case }
|
|
|
|
# Template parameters: PascalCase (following STL conventions)
|
|
- { key: readability-identifier-naming.TypeTemplateParameterCase, value: CamelCase }
|
|
- { key: readability-identifier-naming.ValueTemplateParameterCase, value: lower_case }
|
|
|
|
# Type aliases: PascalCase (modern C++ style with 'using')
|
|
- { key: readability-identifier-naming.TypeAliasCase, value: CamelCase }
|
|
|
|
# Function size limits
|
|
- { key: readability-function-size.LineThreshold, value: 100 }
|
|
- { key: readability-function-size.StatementThreshold, value: 50 }
|
|
|
|
WarningsAsErrors: ''
|
|
HeaderFilterRegex: 'src/.*\.h$'
|
|
FormatStyle: file
|