-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.clang-format
95 lines (95 loc) · 3.41 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# options: https://clang.llvm.org/docs/ClangFormatStyleOptions.html
# clang-format -i <filename> to run in place - and validate Config
BasedOnStyle: LLVM
IndentWidth: 4
ColumnLimit: 100
SpaceAfterCStyleCast: true
UseTab: Never
AlignTrailingComments: true
AlignConsecutiveMacros: Consecutive
AlignConsecutiveBitFields: true
UseCRLF: false
AlignAfterOpenBracket: Align
BinPackArguments: false # false -> if fn call args exceed will be on newlines each
BinPackParameters: false # false -> if params exceed theyll be on newlines each
BreakBeforeBraces: Custom
SpaceBeforeParens: ControlStatements
PointerAlignment: Right
SortIncludes: true
AllowAllConstructorInitializersOnNextLine: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
AlignOperands: true
SortUsingDeclarations: true
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: true
SpaceBeforeCtorInitializerColon: false
SpaceBeforeInheritanceColon: false
SpaceBeforeRangeBasedForLoopColon: false
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
TabWidth: 4
AllowShortFunctionsOnASingleLine: All # allows (All,Empty)Constructor {} to be on same line and short funcs
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: None
AllowShortLoopsOnASingleLine: false
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: Yes
AllowAllParametersOfDeclarationOnNextLine: true
AllowAllArgumentsOnNextLine: true
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: Never
AfterEnum: false
AfterExternBlock: false
AfterFunction: false
AfterNamespace: false
AfterStruct: false
AfterUnion: false
BeforeCatch: false
BeforeElse: false
SplitEmptyFunction: false
SplitEmptyNamespace: true
SplitEmptyRecord: true
BreakBeforeBinaryOperators: None
BreakBeforeTernaryOperators: false
BreakConstructorInitializers: BeforeColon
BreakInheritanceList: AfterColon
BreakStringLiterals: true
CompactNamespaces: true ### Nests Namespaces namespace Foo { namespace Bar {
Cpp11BracedListStyle: true
DerivePointerAlignment: false ## analyze for most common alignment of & and * and override PointerAlignment if diff
FixNamespaceComments: true # adds namespace comments such as // naemspace a
IncludeBlocks: Merge # sort and merge imports
IndentCaseLabels: true
IndentPPDirectives: None
IndentWrappedFunctionNames: true
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 1
NamespaceIndentation: All
PenaltyBreakAssignment: 16
PenaltyBreakBeforeFirstCallParameter: 0
PenaltyBreakString: 64 # sets extra allowed cols before strings are broken onto newlines
PenaltyReturnTypeOnItsOwnLine: 0
ReflowComments: true
# Disabled Settings
# BreakAfterReturnType: Automatic removes operator alignment , dont set
# SpacesInLineCommentPrefix: -1 disables spacing before comments but also classes etc.
# PenaltyExcessCharacter: 0 # sets penalty for chars once exceeding Col Limit
# LineEnding: LF # line ending style : \n or \r\n
# BraceWrapping
# - IndentBraces: true indents if statements to be non aligned within the body
# - SplitEmptyFunction: true
#AfterClass: false