Skip to content

Commit 6b85d9e

Browse files
Upload clang.format
1 parent 520d293 commit 6b85d9e

File tree

1 file changed

+107
-0
lines changed

1 file changed

+107
-0
lines changed

.clang-format

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# please use clang-format version 8 or later
2+
3+
Standard: Cpp11
4+
AccessModifierOffset: -8
5+
AlignAfterOpenBracket: Align
6+
AlignConsecutiveAssignments: false
7+
AlignConsecutiveDeclarations: false
8+
AlignEscapedNewlines: Left
9+
AlignOperands: true
10+
AlignTrailingComments: true
11+
#AllowAllArgumentsOnNextLine: false # requires clang-format 9
12+
#AllowAllConstructorInitializersOnNextLine: false # requires clang-format 9
13+
AllowAllParametersOfDeclarationOnNextLine: false
14+
AllowShortBlocksOnASingleLine: false
15+
AllowShortCaseLabelsOnASingleLine: false
16+
AllowShortFunctionsOnASingleLine: Inline
17+
AllowShortIfStatementsOnASingleLine: false
18+
#AllowShortLambdasOnASingleLine: Inline # requires clang-format 9
19+
AllowShortLoopsOnASingleLine: false
20+
AlwaysBreakAfterDefinitionReturnType: None
21+
AlwaysBreakAfterReturnType: None
22+
AlwaysBreakBeforeMultilineStrings: false
23+
AlwaysBreakTemplateDeclarations: false
24+
BinPackArguments: true
25+
BinPackParameters: true
26+
BraceWrapping:
27+
AfterClass: false
28+
AfterControlStatement: false
29+
AfterEnum: false
30+
AfterFunction: true
31+
AfterNamespace: false
32+
AfterObjCDeclaration: false
33+
AfterStruct: false
34+
AfterUnion: false
35+
AfterExternBlock: false
36+
BeforeCatch: false
37+
BeforeElse: false
38+
IndentBraces: false
39+
SplitEmptyFunction: true
40+
SplitEmptyRecord: true
41+
SplitEmptyNamespace: true
42+
BreakBeforeBinaryOperators: None
43+
BreakBeforeBraces: Custom
44+
BreakBeforeTernaryOperators: true
45+
BreakConstructorInitializers: BeforeColon
46+
BreakStringLiterals: false # apparently unpredictable
47+
ColumnLimit: 160
48+
CompactNamespaces: false
49+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
50+
ConstructorInitializerIndentWidth: 8
51+
ContinuationIndentWidth: 8
52+
Cpp11BracedListStyle: true
53+
DerivePointerAlignment: false
54+
DisableFormat: false
55+
FixNamespaceComments: false
56+
ForEachMacros:
57+
- 'json_object_foreach'
58+
- 'json_object_foreach_safe'
59+
- 'json_array_foreach'
60+
IncludeBlocks: Preserve
61+
IndentCaseLabels: false
62+
IndentPPDirectives: None
63+
IndentWidth: 8
64+
IndentWrappedFunctionNames: false
65+
KeepEmptyLinesAtTheStartOfBlocks: true
66+
MaxEmptyLinesToKeep: 1
67+
NamespaceIndentation: None
68+
#ObjCBinPackProtocolList: Auto # requires clang-format 7
69+
ObjCBlockIndentWidth: 8
70+
ObjCSpaceAfterProperty: true
71+
ObjCSpaceBeforeProtocolList: true
72+
73+
PenaltyBreakAssignment: 10
74+
PenaltyBreakBeforeFirstCallParameter: 30
75+
PenaltyBreakComment: 10
76+
PenaltyBreakFirstLessLess: 0
77+
PenaltyBreakString: 10
78+
PenaltyExcessCharacter: 100
79+
PenaltyReturnTypeOnItsOwnLine: 60
80+
81+
PointerAlignment: Right
82+
ReflowComments: false
83+
SortIncludes: false
84+
SortUsingDeclarations: false
85+
SpaceAfterCStyleCast: false
86+
#SpaceAfterLogicalNot: false # requires clang-format 9
87+
SpaceAfterTemplateKeyword: false
88+
SpaceBeforeAssignmentOperators: true
89+
#SpaceBeforeCtorInitializerColon: true # requires clang-format 7
90+
#SpaceBeforeInheritanceColon: true # requires clang-format 7
91+
SpaceBeforeParens: ControlStatements
92+
#SpaceBeforeRangeBasedForLoopColon: true # requires clang-format 7
93+
SpaceInEmptyParentheses: false
94+
SpacesBeforeTrailingComments: 1
95+
SpacesInAngles: false
96+
SpacesInCStyleCastParentheses: false
97+
SpacesInContainerLiterals: false
98+
SpacesInParentheses: false
99+
SpacesInSquareBrackets: false
100+
#StatementMacros: # requires clang-format 8
101+
# - 'Q_OBJECT'
102+
TabWidth: 8
103+
#TypenameMacros: # requires clang-format 9
104+
# - 'DARRAY'
105+
UseTab: ForContinuationAndIndentation
106+
---
107+
Language: ObjC

0 commit comments

Comments
 (0)