Add a .clang-format file
This commit is contained in:
72
.clang-format
Normal file
72
.clang-format
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
---
|
||||||
|
BasedOnStyle: WebKit
|
||||||
|
Language: Cpp
|
||||||
|
Standard: Cpp14
|
||||||
|
|
||||||
|
IndentWidth: 4
|
||||||
|
SpacesBeforeTrailingComments: 1
|
||||||
|
TabWidth: 8
|
||||||
|
UseTab: Never
|
||||||
|
ContinuationIndentWidth: 4
|
||||||
|
MaxEmptyLinesToKeep: 3
|
||||||
|
BreakBeforeBinaryOperators: NonAssignment
|
||||||
|
BreakBeforeTernaryOperators: true
|
||||||
|
BreakConstructorInitializers: BeforeColon
|
||||||
|
BreakConstructorInitializersBeforeComma: true
|
||||||
|
|
||||||
|
BreakBeforeBraces: Custom
|
||||||
|
BraceWrapping:
|
||||||
|
AfterClass: true
|
||||||
|
AfterControlStatement: false
|
||||||
|
AfterEnum: false
|
||||||
|
AfterFunction: true
|
||||||
|
AfterNamespace: false
|
||||||
|
AfterObjCDeclaration: false
|
||||||
|
AfterStruct: true
|
||||||
|
AfterUnion: false
|
||||||
|
BeforeCatch: false
|
||||||
|
BeforeElse: false
|
||||||
|
IndentBraces: false
|
||||||
|
|
||||||
|
ForEachMacros:
|
||||||
|
- forever # avoids { wrapped to next line
|
||||||
|
- foreach
|
||||||
|
- Q_FOREACH
|
||||||
|
|
||||||
|
AccessModifierOffset: -4
|
||||||
|
ConstructorInitializerIndentWidth: 4
|
||||||
|
AlignEscapedNewlinesLeft: false
|
||||||
|
AlignTrailingComments: false
|
||||||
|
AllowAllParametersOfDeclarationOnNextLine: true
|
||||||
|
AllowShortIfStatementsOnASingleLine: false
|
||||||
|
AllowShortLoopsOnASingleLine: false
|
||||||
|
AllowShortFunctionsOnASingleLine: false
|
||||||
|
AllowShortEnumsOnASingleLine: false # requires clang-format 11
|
||||||
|
AlignAfterOpenBracket: true
|
||||||
|
AlwaysBreakBeforeMultilineStrings: false
|
||||||
|
AlwaysBreakTemplateDeclarations: true
|
||||||
|
BinPackParameters: true
|
||||||
|
ColumnLimit: 100
|
||||||
|
Cpp11BracedListStyle: false
|
||||||
|
DerivePointerBinding: false
|
||||||
|
ExperimentalAutoDetectBinPacking: false
|
||||||
|
IndentCaseLabels: false
|
||||||
|
NamespaceIndentation: None
|
||||||
|
ObjCSpaceBeforeProtocolList: true
|
||||||
|
PenaltyBreakBeforeFirstCallParameter: 19
|
||||||
|
PenaltyBreakComment: 60
|
||||||
|
PenaltyBreakFirstLessLess: 120
|
||||||
|
PenaltyBreakString: 1000
|
||||||
|
PenaltyExcessCharacter: 1000000
|
||||||
|
PenaltyReturnTypeOnItsOwnLine: 60
|
||||||
|
PointerBindsToType: false
|
||||||
|
SpaceAfterTemplateKeyword: false
|
||||||
|
IndentFunctionDeclarationAfterType: false
|
||||||
|
SpaceAfterControlStatementKeyword: true
|
||||||
|
SpaceBeforeAssignmentOperators: true
|
||||||
|
SpaceInEmptyParentheses: false
|
||||||
|
SpacesInAngles: false
|
||||||
|
SpacesInCStyleCastParentheses: true
|
||||||
|
SpacesInParentheses: false
|
||||||
|
...
|
||||||
|
|
||||||
Reference in New Issue
Block a user