-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy path.clang-format
68 lines (62 loc) · 1.56 KB
/
.clang-format
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Base Style
BasedOnStyle: LLVM
Language: ObjC
# Indentation
IndentWidth: 4
ObjCBlockIndentWidth: 4
UseTab: Never
ColumnLimit: 100
AccessModifierOffset: -4
IndentCaseLabels: true
NamespaceIndentation: Inner
# Alignment
AlignConsecutiveAssignments: Consecutive
AlignConsecutiveDeclarations: Consecutive
AlignConsecutiveMacros: Consecutive
AlignTrailingComments: true
AlignOperands: true
AlignAfterOpenBracket: Align
# Objective-C specific
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
ObjCBreakBeforeNestedBlockParam: true
ObjCBinPackProtocolList: Never
# Breaking and wrapping
AllowShortBlocksOnASingleLine: Empty
AllowShortFunctionsOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: false
AllowShortEnumsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: Empty
AllowShortLoopsOnASingleLine: false
BreakBeforeBraces: Custom
BraceWrapping:
AfterObjCDeclaration: true
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
BeforeCatch: true
BeforeElse: true
IndentBraces: false
# Spaces
SpaceAfterCStyleCast: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: true
SpacesInParentheses: false
SpacesInSquareBrackets: false
# Import ordering
SortIncludes: true
IncludeBlocks: Regroup
IncludeCategories:
# System headers with brackets
- Regex: "^<"
Priority: 1
# Main header (matching filename)
- Regex: '^"[^/]*\.h"$'
Priority: 2
# Local/Project headers
- Regex: '^"'
Priority: 3