forked from golioth/golioth-esp-idf-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.clang-format
84 lines (78 loc) · 2.38 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
# clang-format configuration file
#
# Please seek consensus from the team before modifying this file.
#
# To compare these settings with all available clang-format options:
# diff <(clang-format -dump-config | grep -Ev '^$|^( |BraceWrapping|IncludeCategories)' | sed -Ee 's/: +/: /g' | sort) <(cat .clang-format | grep -Ev '^$|^#' | sort) | colordiff
#
---
DisableFormat: false
Language: Cpp
Standard: Cpp11
# Indentation & whitespace
AccessModifierOffset: -4
ColumnLimit: 100
ConstructorInitializerIndentWidth: 8
ContinuationIndentWidth: 8
IndentCaseLabels: true
IndentWidth: 4
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: true
MaxEmptyLinesToKeep: 2
NamespaceIndentation: None
SpacesBeforeTrailingComments: 2
TabWidth: 4
UseTab: Never
# Spacing style
Cpp11BracedListStyle: true
DerivePointerAlignment: false
PointerAlignment: Left
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
# Comments
AlignTrailingComments: true
CommentPragmas: ''
FixNamespaceComments: true
ReflowComments: true
# Pattern-based special behavior
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
IncludeCategories: []
MacroBlockBegin: ''
MacroBlockEnd: ''
SortIncludes: false
# Alignment & breaking
AlignAfterOpenBracket: AlwaysBreak
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: DontAlign
AlignOperands: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: true
BinPackArguments: false
BinPackParameters: false
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeBraces: Attach
BreakBeforeInheritanceComma: true
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: true
BreakStringLiterals: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
# Prevent return type from being on a line of its own
PenaltyReturnTypeOnItsOwnLine: 1000
...