CodeCommitsIssuesPull requestsActionsInsightsSecurity
f9d3c01a01584534e431ffd0fba9880405e518dd

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

.clang-format

103lines · modecode

1---
2BasedOnStyle: WebKit
3Language: Cpp
4AlignAfterOpenBracket: false
5BreakBeforeBraces: Custom
6BraceWrapping: {
7 AfterClass: 'true'
8 AfterControlStatement: 'true'
9 AfterEnum : 'true'
10 AfterFunction : 'true'
11 AfterNamespace : 'true'
12 AfterStruct : 'true'
13 AfterUnion : 'true'
14 BeforeCatch : 'true'
15 BeforeElse : 'true'
16 IndentBraces : 'false'
17}
18
19BreakConstructorInitializersBeforeComma: false
20Cpp11BracedListStyle: true
21ColumnLimit: 140
22ConstructorInitializerAllOnOneLineOrOnePerLine: true
23ExperimentalAutoDetectBinPacking: true
24UseTab: Never
25TabWidth: 4
26IndentWidth: 4
27Standard: Cpp11
28PointerAlignment: Middle
29MaxEmptyLinesToKeep: 2
30KeepEmptyLinesAtTheStartOfBlocks: false
31#AllowShortFunctionsOnASingleLine: Inline
32AllowShortFunctionsOnASingleLine: Empty
33AlwaysBreakTemplateDeclarations: true
34IndentCaseLabels: true
35#SpaceAfterTemplateKeyword: true
36SortIncludes: true
37IncludeCategories:
38 - Regex: '^<[a-z_]+>'
39 Priority: 1
40 - Regex: '^<[a-z_]+.h>'
41 Priority: 2
42 - Regex: '^["<](common|ext|mysqlxx|daemon|zkutil)/'
43 Priority: 90
44 - Regex: '^["<](DB)/'
45 Priority: 100
46 - Regex: '^["<](Poco)/'
47 Priority: 50
48 - Regex: '^"'
49 Priority: 110
50 - Regex: '/'
51 Priority: 30
52 - Regex: '.*'
53 Priority: 40
54ReflowComments: false
55AlignEscapedNewlinesLeft: true
56
57# Not changed:
58AccessModifierOffset: -4
59AlignConsecutiveAssignments: false
60AlignOperands: false
61AlignTrailingComments: false
62AllowAllParametersOfDeclarationOnNextLine: true
63AllowShortBlocksOnASingleLine: false
64AllowShortCaseLabelsOnASingleLine: false
65AllowShortIfStatementsOnASingleLine: false
66AllowShortLoopsOnASingleLine: false
67AlwaysBreakAfterDefinitionReturnType: None
68AlwaysBreakBeforeMultilineStrings: false
69BinPackArguments: false
70BinPackParameters: false
71BreakBeforeBinaryOperators: All
72BreakBeforeTernaryOperators: true
73CommentPragmas: '^ IWYU pragma:'
74ConstructorInitializerIndentWidth: 4
75ContinuationIndentWidth: 4
76DerivePointerAlignment: false
77DisableFormat: false
78ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
79IndentWidth: 4
80IndentWrappedFunctionNames: false
81MacroBlockBegin: ''
82MacroBlockEnd: ''
83NamespaceIndentation: Inner
84ObjCBlockIndentWidth: 4
85ObjCSpaceAfterProperty: true
86ObjCSpaceBeforeProtocolList: true
87PenaltyBreakBeforeFirstCallParameter: 19
88PenaltyBreakComment: 300
89PenaltyBreakFirstLessLess: 120
90PenaltyBreakString: 1000
91PenaltyExcessCharacter: 1000000
92PenaltyReturnTypeOnItsOwnLine: 60
93SpaceAfterCStyleCast: false
94SpaceBeforeAssignmentOperators: true
95SpaceBeforeParens: ControlStatements
96SpaceInEmptyParentheses: false
97SpacesBeforeTrailingComments: 1
98SpacesInContainerLiterals: true
99SpacesInCStyleCastParentheses: false
100SpacesInParentheses: false
101SpacesInSquareBrackets: false
102...