-
Notifications
You must be signed in to change notification settings - Fork 158
/
.clang-format
75 lines (72 loc) · 2.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
69
70
71
72
73
74
75
# Plan is to test a few files at a time, see if we can get a baseline clang which has minimal impact on the source
# Allow it to fix stuff where we're really not consistent already, but mostly should be a no-op on the file
# Once a good balance is found, we can start getting aggressive about changing options, things like no -indent on namespace.
Language: Cpp
AccessModifierOffset: -4
AlignAfterOpenBracket: AlwaysBreak
AlignEscapedNewlinesLeft: DontAlign
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortIfStatementsOnASingleLine: true
BinPackArguments: false
BinPackParameters: false
BreakBeforeBraces: Custom
BraceWrapping: # Will likely end up enabling more/all of these before we're done testing
AfterCaseLabel: true
AfterNamespace: true
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterStruct: true
# AfterUnion: true
# BeforeCatch: true
BeforeElse: true
# IndentBraces: false
# SplitEmptyFunction: false
# SplitEmptyRecord: false
# SplitEmptyNamespace: false
ColumnLimit: 120 # This is large now to minimize churn but needs to be lowered
IndentWidth: 4
NamespaceIndentation: All
#PenaltyExcessCharacter: 0 # This is serious overkill - let's try not to use it
PenaltyReturnTypeOnItsOwnLine: 20
PointerAlignment: Left
ReflowComments: false
SortIncludes: false
SpaceAfterCStyleCast : true
SpacesBeforeTrailingComments: 1
Standard: Cpp11
TabWidth: 4
UseTab: Always
# These are other format switches we know about - will likely need to turn some of these on/off before we're done
#AllowShortBlocksOnASingleLine: true
#AllowShortFunctionsOnASingleLine: true
#AllowShortLoopsOnASingleLine: true
#AlwaysBreakAfterDefinitionReturnType: None
#AlwaysBreakAfterReturnType: None
#AlwaysBreakBeforeMultilineStrings: false
#AlwaysBreakTemplateDeclarations: false
#BreakBeforeBinaryOperators: false
#BreakBeforeTernaryOperators: false
#BreakConstructorInitializersBeforeComma: false
#CommentPragmas: ''
#ConstructorInitializerAllOnOneLineOrOnePerLine: false
#ConstructorInitializerIndentWidth: 0
#ContinuationIndentWidth: 4
#Cpp11BracedListStyle: true
#DerivePointerBinding: false
#IndentCaseLabels: false
#IndentFunctionDeclarationAfterType: false
#MaxEmptyLinesToKeep: 2
#PenaltyBreakBeforeFirstCallParameter: 100
#PenaltyBreakComment: 100
#PenaltyBreakFirstLessLess: 0
#PenaltyBreakString: 100
#SpaceBeforeAssignmentOperators: true
#SpaceBeforeParens: ControlStatements
#SpaceInEmptyParentheses: false
#SpacesInAngles: false
#SpacesInCStyleCastParentheses: false
#SpacesInContainerLiterals: false
#SpacesInParentheses: false