qtpromise/.clang-format
Simon Brunel d43657fbd5 Use clang-format for code style consistency
Based on the WebKit preset and following 'most' of the Qt guidelines, except a few rules that work better for promise continuation lambdas. Requires clang-format 11.
2020-03-22 17:50:16 +01:00

67 lines
1.6 KiB
YAML

---
Language: Cpp
Standard: Cpp11
BasedOnStyle: WebKit
AlignAfterOpenBracket: true
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: false
AllowShortFunctionsOnASingleLine: Inline
AllowShortLambdasOnASingleLine: Empty
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
AfterCaseLabel: false
AfterClass: true
AfterControlStatement: false
AfterEnum: false
AfterFunction: true
AfterNamespace: false
AfterStruct: true
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeBraces: Custom
BreakInheritanceList: BeforeComma
BreakConstructorInitializers: BeforeColon
ColumnLimit: 100
CommentPragmas: "^!|^:"
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
Cpp11BracedListStyle: true
FixNamespaceComments: true
ForEachMacros:
- BOOST_FOREACH
- foreach
- forever
- Q_FOREACH
- Q_FOREVER
- QBENCHMARK
- QBENCHMARK_ONCE
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^<Q.*>'
Priority: 2
SortPriority: 0
- Regex: '^<.*\.h>'
Priority: 3
SortPriority: 0
- Regex: '^<.*>'
Priority: 4
SortPriority: 0
- Regex: '.*'
Priority: 1
SortPriority: 0
IndentPPDirectives: AfterHash
NamespaceIndentation: None
PenaltyReturnTypeOnItsOwnLine: 10
SpaceAfterTemplateKeyword: false
SpaceBeforeCpp11BracedList: false
...