aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2020-11-11 19:17:23 +0100
committerKitsune Ral <Kitsune-Ral@users.sf.net>2020-11-11 19:17:23 +0100
commit39b80fa8eb9b70d287aa453663b845319d8b6196 (patch)
tree97fc540754d060c99295b55a82d721779946fc51
parentb27ef93df9b5147ab03c8a255918874b9f73c201 (diff)
downloadlibquotient-39b80fa8eb9b70d287aa453663b845319d8b6196.tar.gz
libquotient-39b80fa8eb9b70d287aa453663b845319d8b6196.zip
.clang-format: update for ClangFormat 10+
Also: add space before colon in range-based for from now on. [skip ci]
-rw-r--r--.clang-format43
1 files changed, 28 insertions, 15 deletions
diff --git a/.clang-format b/.clang-format
index 9ae1dc05..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,26 +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
...
+