Improve the clang-tidy and clang-format config

This commit is contained in:
Denis Blank 2020-04-03 18:13:41 +02:00
parent f7e00bcc8d
commit 564d134c75
2 changed files with 22 additions and 9 deletions

View File

@ -1,15 +1,28 @@
BasedOnStyle: LLVM BasedOnStyle: LLVM
AlignAfterOpenBracket: Align
AllowAllArgumentsOnNextLine: 'true'
AllowAllConstructorInitializersOnNextLine: 'true'
AllowAllParametersOfDeclarationOnNextLine: 'true'
AllowShortCaseLabelsOnASingleLine: 'false'
AllowShortFunctionsOnASingleLine: Empty
AllowShortLambdasOnASingleLine: Empty
AlwaysBreakTemplateDeclarations: 'Yes'
BinPackArguments: 'true'
BinPackParameters: 'true'
BreakConstructorInitializers: BeforeComma
BreakConstructorInitializersBeforeComma: 'true'
ConstructorInitializerIndentWidth: 2
FixNamespaceComments: 'true'
IndentCaseLabels: 'true'
IndentPPDirectives: AfterHash
PenaltyBreakAssignment: 1000
PenaltyBreakBeforeFirstCallParameter: 100
PointerAlignment: Left PointerAlignment: Left
IndentCaseLabels: true
AllowShortFunctionsOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AlwaysBreakTemplateDeclarations: true
BinPackArguments: true
FixNamespaceComments: true
# IndentPPDirectives: AfterHash
MacroBlockBegin: "^CONTINUABLE_BLOCK_.*_BEGIN$" MacroBlockBegin: "^CONTINUABLE_BLOCK_.*_BEGIN$"
MacroBlockEnd: "^CONTINUABLE_BLOCK_.*_END$" MacroBlockEnd: "^CONTINUABLE_BLOCK_.*_END$"
IncludeCategories: IncludeCategories:
- Regex: '^<+[a-z_]+>' - Regex: '^<+[a-z_]+>'
Priority: 1 Priority: 1

View File

@ -1,4 +1,4 @@
Checks: '-*,cppcoreguidelines-*,-cppcoreguidelines-pro-type-vararg,modernize--*,llvm-*,misc-*,readability-identifier-naming' Checks: '-*,cppcoreguidelines-*,-cppcoreguidelines-pro-type-vararg,-cppcoreguidelines-macro-usage,bugprone-*,modernize-*,boost-*,llvm-*,misc-*,portability-*,readability-*'
CheckOptions: CheckOptions:
- key: readability-identifier-naming.ClassCase - key: readability-identifier-naming.ClassCase
value: lower_case value: lower_case
@ -16,4 +16,4 @@ CheckOptions:
value: lower_case value: lower_case
- key: readability-identifier-naming.Macro - key: readability-identifier-naming.Macro
value: UPPER_CASE value: UPPER_CASE
HeaderFilterRegex: 'include/.(hpp)$' HeaderFilterRegex: 'include/continuable/.(hpp)$'