.clang-format 2.6 KB
Newer Older
1 2
BasedOnStyle: WebKit
Language: Cpp
I
Ivan Lezhankin 已提交
3
AlignAfterOpenBracket: AlwaysBreak
P
proller 已提交
4
BreakBeforeBraces: Custom
5 6 7 8 9 10 11 12 13 14 15
BraceWrapping:
    AfterClass: true
    AfterControlStatement: true
    AfterEnum: true
    AfterFunction: true
    AfterNamespace: true
    AfterStruct: true
    AfterUnion: true
    BeforeCatch: true
    BeforeElse: true
    IndentBraces: false
16
BreakConstructorInitializersBeforeComma: false
17
Cpp11BracedListStyle: true
18
ColumnLimit: 140
19 20
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ExperimentalAutoDetectBinPacking: true
21 22 23
UseTab: Never
TabWidth: 4
IndentWidth: 4
24 25 26 27
Standard: Cpp11
PointerAlignment: Middle
MaxEmptyLinesToKeep: 2
KeepEmptyLinesAtTheStartOfBlocks: false
I
Ivan Lezhankin 已提交
28
AllowShortFunctionsOnASingleLine: InlineOnly
29
AlwaysBreakTemplateDeclarations: true
30
IndentCaseLabels: true
31
SpaceAfterTemplateKeyword: true
P
proller 已提交
32
SpaceBeforeCpp11BracedList: false
33
SortIncludes: true
P
proller 已提交
34
IndentPPDirectives: AfterHash
35
IncludeCategories:
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
  - Regex: '^<[a-z_]+>'
    Priority: 1
  - Regex: '^<[a-z_]+.h>'
    Priority: 2
  - Regex: '^["<](common|ext|mysqlxx|daemon|zkutil)/'
    Priority: 90
  - Regex: '^["<](DB)/'
    Priority: 100
  - Regex: '^["<](Poco)/'
    Priority: 50
  - Regex: '^"'
    Priority: 110
  - Regex: '/'
    Priority: 30
  - Regex: '.*'
    Priority: 40
52
ReflowComments: false
P
proller 已提交
53 54
AlignEscapedNewlinesLeft: false
AlignEscapedNewlines: DontAlign
55 56 57 58

# Not changed:
AccessModifierOffset: -4
AlignConsecutiveAssignments: false
59
AlignOperands: false
60 61 62 63 64 65 66 67 68 69 70 71
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakBeforeMultilineStrings: false
BinPackArguments: false
BinPackParameters: false
BreakBeforeBinaryOperators: All
BreakBeforeTernaryOperators: true
72
CommentPragmas: '^ IWYU pragma:'
73 74 75
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
DerivePointerAlignment: false
76 77
DisableFormat: false
IndentWidth: 4
78 79
IndentWrappedFunctionNames: false
MacroBlockBegin: ''
80
MacroBlockEnd: ''
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
NamespaceIndentation: Inner
ObjCBlockIndentWidth: 4
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
SpaceAfterCStyleCast: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false