diff options
Diffstat (limited to '.clang-format')
-rw-r--r-- | .clang-format | 44 |
1 files changed, 29 insertions, 15 deletions
diff --git a/.clang-format b/.clang-format index 5d1f6485..7cc0f46e 100644 --- a/.clang-format +++ b/.clang-format @@ -19,23 +19,29 @@ Language: Cpp BasedOnStyle: WebKit #AccessModifierOffset: -4 AlignAfterOpenBracket: Align +#AlignConsecutiveMacros: false #AlignConsecutiveAssignments: false #AlignConsecutiveDeclarations: false AlignEscapedNewlines: Left AlignOperands: true #AlignTrailingComments: false +#AllowAllArgumentsOnNextLine: true +#AllowAllConstructorInitializersOnNextLine: true #AllowAllParametersOfDeclarationOnNextLine: true -#AllowShortBlocksOnASingleLine: false +#AllowShortBlocksOnASingleLine: false # 'Empty' since ClangFormat 10 #AllowShortCaseLabelsOnASingleLine: false #AllowShortFunctionsOnASingleLine: All -#AllowShortIfStatementsOnASingleLine: false +#AllowShortLambdasOnASingleLine: All +#AllowShortIfStatementsOnASingleLine: false # 'Never' since ClangFormat 10 #AllowShortLoopsOnASingleLine: false +#AlwaysBreakAfterDefinitionReturnType: None # deprecated #AlwaysBreakAfterReturnType: None #AlwaysBreakBeforeMultilineStrings: false -AlwaysBreakTemplateDeclarations: true +AlwaysBreakTemplateDeclarations: Yes #BinPackArguments: true #BinPackParameters: true BraceWrapping: + AfterCaseLabel: false AfterClass: false AfterControlStatement: false AfterEnum: false @@ -53,21 +59,21 @@ BraceWrapping: BreakBeforeBinaryOperators: NonAssignment BreakBeforeBraces: Custom #BreakBeforeInheritanceComma: false -#BreakInheritanceList: BeforeColon # Only supported since clang-format 7 +#BreakInheritanceList: BeforeColon #BreakBeforeTernaryOperators: true #BreakConstructorInitializersBeforeComma: false #BreakConstructorInitializers: BeforeComma #BreakStringLiterals: true ColumnLimit: 80 -#CommentPragmas: '^!|^:' CompactNamespaces: false ConstructorInitializerAllOnOneLineOrOnePerLine: true #ConstructorInitializerIndentWidth: 4 #ContinuationIndentWidth: 4 Cpp11BracedListStyle: false +#DeriveLineEnding: true #DerivePointerAlignment: false FixNamespaceComments: true -ForEachMacros: +ForEachMacros: - foreach - Q_FOREACH - forever @@ -83,14 +89,13 @@ IncludeCategories: Priority: 4 - Regex: '.*' Priority: 1 -IncludeIsMainRegex: '(_test)?$' +#IncludeIsMainRegex: '(_test)?$' +#IncludeIsMainSourceRegex: '' #IndentCaseLabels: false +IndentGotoLabels: false IndentPPDirectives: AfterHash -#IndentWidth: 4 +#IndentWidth: 4 #IndentWrappedFunctionNames: false -#JavaScriptQuotes: Leave -#JavaScriptWrapImports: true -#KeepLineBreaksForNonEmptyLines: false KeepEmptyLinesAtTheStartOfBlocks: false #MacroBlockBegin: '' #MacroBlockEnd: '' @@ -105,25 +110,34 @@ PenaltyBreakString: 200 PenaltyExcessCharacter: 20 PenaltyReturnTypeOnItsOwnLine: 60 #PointerAlignment: Left -#ReflowComments: true +#ReflowComments: true #SortIncludes: true SortUsingDeclarations: false #SpaceAfterCStyleCast: false +#SpaceAfterLogicalNot: false #SpaceAfterTemplateKeyword: true #SpaceBeforeAssignmentOperators: true #SpaceBeforeCpp11BracedList: true #SpaceBeforeCtorInitializerColon: true #SpaceBeforeInheritanceColon: true #SpaceBeforeParens: ControlStatements -SpaceBeforeRangeBasedForLoopColon: false +SpaceBeforeRangeBasedForLoopColon: true +SpaceInEmptyBlock: false #SpaceInEmptyParentheses: false #SpacesBeforeTrailingComments: 1 #SpacesInAngles: false +#SpacesInConditionalStatement: false #SpacesInContainerLiterals: true #SpacesInCStyleCastParentheses: false #SpacesInParentheses: false #SpacesInSquareBrackets: false -Standard: Cpp11 -#TabWidth: 4 +#SpaceBeforeSquareBrackets: false +Standard: Cpp11 # Once on ClangFormat 10, switch to Cpp17 +StatementMacros: + - Q_UNUSED + - QT_REQUIRE_VERSION +TabWidth: 4 +#UseCRLF: false #UseTab: Never ... + |