fix(cpp): update style and lints
This commit is contained in:
+17
-2
@@ -23,12 +23,27 @@ PackConstructorInitializers: Never
|
||||
SpaceBeforeCpp11BracedList: true
|
||||
SpaceInEmptyBraces: Always
|
||||
|
||||
WhitespaceSensitiveMacros:
|
||||
- SIGNAL
|
||||
- SLOT
|
||||
|
||||
StatementMacros:
|
||||
- Q_CLASSINFO
|
||||
- Q_DECLARE_FLAGS
|
||||
- Q_DECLARE_LOGGING_CATEGORY
|
||||
- Q_DECLARE_OPERATORS_FOR_FLAGS
|
||||
- Q_LOGGING_CATEGORY
|
||||
- Q_OBJECT
|
||||
- Q_PROPERTY
|
||||
- Q_UNUSED
|
||||
|
||||
IncludeBlocks: Regroup
|
||||
IncludeCategories:
|
||||
- Regex: '^"'
|
||||
Priority: 1
|
||||
- Regex: '^<'
|
||||
- Regex: '^<Q'
|
||||
Priority: 2
|
||||
IncludeIsMainRegex: '(_test)?$'
|
||||
- Regex: '^<'
|
||||
Priority: 3
|
||||
SortIncludes: true
|
||||
...
|
||||
|
||||
+48
-24
@@ -12,9 +12,14 @@ Checks: >
|
||||
portability-*,
|
||||
readability-*,
|
||||
-bugprone-easily-swappable-parameters,
|
||||
-clang-analyzer-cplusplus.NewDeleteLeaks,
|
||||
-clang-analyzer-optin.core.EnumCastOutOfRange,
|
||||
-misc-no-recursion,
|
||||
-modernize-use-trailing-return-type,
|
||||
-modernize-use-nodiscard,
|
||||
-portability-avoid-pragma-once,
|
||||
-readability-identifier-length,
|
||||
-readability-redundant-access-specifiers,
|
||||
-readability-magic-numbers
|
||||
|
||||
CheckOptions:
|
||||
@@ -22,43 +27,62 @@ CheckOptions:
|
||||
value: false
|
||||
- key: misc-include-cleaner.UnusedIncludes
|
||||
value: true
|
||||
- key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
|
||||
value: true
|
||||
- key: misc-const-correctness.AnalyzePointers
|
||||
value: false
|
||||
- key: modernize-avoid-c-arrays.AllowStringArrays
|
||||
value: true
|
||||
- key: readability-implicit-bool-conversion.AllowPointerConditions
|
||||
value: true
|
||||
- key: readability-implicit-bool-conversion.AllowIntegerConditions
|
||||
value: true
|
||||
- key: readability-function-cognitive-complexity.Threshold
|
||||
value: 75
|
||||
- key: readability-function-cognitive-complexity.IgnoreMacros
|
||||
value: true
|
||||
- key: readability-identifier-naming.ClassCase
|
||||
value: CamelCase
|
||||
- key: readability-identifier-naming.ConstantCase
|
||||
- key: readability-identifier-naming.StructCase
|
||||
value: CamelCase
|
||||
- key: readability-identifier-naming.ConstantPrefix
|
||||
value: k
|
||||
- key: readability-identifier-naming.EnumCase
|
||||
value: CamelCase
|
||||
- key: readability-identifier-naming.EnumConstantCase
|
||||
value: CamelCase
|
||||
- key: readability-identifier-naming.FunctionCase
|
||||
value: lower_case
|
||||
- key: readability-identifier-naming.MacroDefinitionCase
|
||||
value: UPPER_CASE
|
||||
- key: readability-identifier-naming.MethodCase
|
||||
value: lower_case
|
||||
- key: readability-identifier-naming.NamespaceCase
|
||||
value: lower_case
|
||||
- key: readability-identifier-naming.ParameterCase
|
||||
value: lower_case
|
||||
- key: readability-identifier-naming.PrivateMemberCase
|
||||
value: lower_case
|
||||
- key: readability-identifier-naming.PrivateMemberSuffix
|
||||
value: _
|
||||
- key: readability-identifier-naming.ScopedEnumConstantCase
|
||||
value: CamelCase
|
||||
- key: readability-identifier-naming.StructCase
|
||||
value: CamelCase
|
||||
- key: readability-identifier-naming.TemplateParameterCase
|
||||
value: CamelCase
|
||||
- key: readability-identifier-naming.FunctionCase
|
||||
value: camelBack
|
||||
- key: readability-identifier-naming.MethodCase
|
||||
value: camelBack
|
||||
- key: readability-identifier-naming.ParameterCase
|
||||
value: camelBack
|
||||
- key: readability-identifier-naming.LocalVariableCase
|
||||
value: camelBack
|
||||
- key: readability-identifier-naming.LocalConstantCase
|
||||
value: camelBack
|
||||
- key: readability-identifier-naming.MemberCase
|
||||
value: camelBack
|
||||
- key: readability-identifier-naming.PrivateMemberCase
|
||||
value: camelBack
|
||||
- key: readability-identifier-naming.PrivateMemberPrefix
|
||||
value: m_
|
||||
- key: readability-identifier-naming.ProtectedMemberCase
|
||||
value: camelBack
|
||||
- key: readability-identifier-naming.ProtectedMemberPrefix
|
||||
value: m_
|
||||
- key: readability-identifier-naming.GlobalConstantCase
|
||||
value: camelBack
|
||||
- key: readability-identifier-naming.StaticConstantCase
|
||||
value: camelBack
|
||||
- key: readability-identifier-naming.ConstexprVariableCase
|
||||
value: camelBack
|
||||
- key: readability-identifier-naming.NamespaceCase
|
||||
value: lower_case
|
||||
- key: readability-identifier-naming.TypeAliasCase
|
||||
value: CamelCase
|
||||
- key: readability-identifier-naming.TypedefCase
|
||||
value: CamelCase
|
||||
- key: readability-identifier-naming.VariableCase
|
||||
value: lower_case
|
||||
|
||||
FormatStyle: file
|
||||
HeaderFilterRegex: '^(src|include|tests)/.*'
|
||||
...
|
||||
|
||||
Reference in New Issue
Block a user