-
Notifications
You must be signed in to change notification settings - Fork 34
/
.clang-format
81 lines (66 loc) · 2.19 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
---
BasedOnStyle: Google
IndentWidth: '4'
ColumnLimit: '120'
IncludeCategories:
# main include automatically assigned to Priority 0
- Regex: '^".*_(conf|config)\.(hpp|h)"$' # config headers
Priority: 3
- Regex: '^".*"$' # sibling & project headers
Priority: 1
- Regex: '^<.*>$' # system & library headers
Priority: 2
# Format function arguments and parameters
BinPackArguments: 'false'
BinPackParameters: 'false'
AllowAllArgumentsOnNextLine: 'false'
AllowAllParametersOfDeclarationOnNextLine: 'false'
AlignAfterOpenBracket: BlockIndent
SpaceBeforeParens: ControlStatements
# Constructor Formatting
PackConstructorInitializers: CurrentLine
IndentAccessModifiers: 'false'
AccessModifierOffset: '-4'
SpaceBeforeCtorInitializerColon: 'true'
BreakConstructorInitializers: BeforeColon
LambdaBodyIndentation: OuterScope
AllowShortCaseLabelsOnASingleLine: 'true'
AllowShortBlocksOnASingleLine: 'false'
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: 'false'
AllowShortEnumsOnASingleLine: 'true'
AllowShortFunctionsOnASingleLine: 'Inline'
AllowShortLambdasOnASingleLine: 'All'
# Switch / Case
IndentCaseLabels: 'true'
IndentCaseBlocks: 'false'
# Preprocessor stuff
AlignConsecutiveMacros: 'true'
AlignEscapedNewlines: Right
AlignTrailingComments: 'false'
SpacesBeforeTrailingComments: 1
# Alignment of procedural code
AlignConsecutiveAssignments: 'false'
AlignConsecutiveDeclarations: 'false'
AlignConsecutiveBitFields: Consecutive
AlignOperands: AlignAfterOperator
# BreakBeforeTernaryOperators: 'false'
BreakBeforeBinaryOperators: 'true'
# Pointers and East/West Const
DerivePointerAlignment: 'false'
PointerAlignment: Left
QualifierAlignment: Leave
# QualifierOrder: ['volatile', 'constexpr', 'static', 'inline', 'type', 'const']
Cpp11BracedListStyle: 'true'
# Vertical Whitespace
SeparateDefinitionBlocks: Leave
EmptyLineBeforeAccessModifier: Always
EmptyLineAfterAccessModifier: Never
# AlignArrayOfStructures: Right
# InsertTrailingCommas: 'Wrapped'
AlwaysBreakAfterReturnType: None
PenaltyReturnTypeOnItsOwnLine: 9999 # We really hate breaking after return types
PenaltyBreakAssignment: 999 # Prefer not to break around =
FixNamespaceComments: 'true'
# NamespaceIndentation: All
...