Repository navigation
Expand file tree
/
Copy path.clang-format
More file actions
executable file
·116 lines (97 loc) · 2.73 KB
/
Copy path.clang-format
File metadata and controls
executable file
·116 lines (97 loc) · 2.73 KB
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
---
# embedDIP Code Style Configuration
# Based on LLVM style with custom modifications for embedded systems
BasedOnStyle: LLVM
# Language settings
Language: Cpp
Standard: c++17
# Indentation
IndentWidth: 4
TabWidth: 4
UseTab: Never
ContinuationIndentWidth: 4
ConstructorInitializerIndentWidth: 4
# Line length
ColumnLimit: 100
# Braces
BreakBeforeBraces: Linux
BraceWrapping:
AfterFunction: true
AfterControlStatement: Never
AfterStruct: false
AfterEnum: false
# Pointer and reference alignment
PointerAlignment: Right
ReferenceAlignment: Right
# Function declarations
AllowShortFunctionsOnASingleLine: Empty
AllowShortBlocksOnASingleLine: Never
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
# Spacing
SpaceBeforeParens: ControlStatements
SpaceAfterCStyleCast: false
SpaceBeforeAssignmentOperators: true
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpacesInAngles: Never
# Alignment
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignOperands: true
AlignTrailingComments: true
AlignAfterOpenBracket: Align
# Breaking
BreakBeforeBinaryOperators: None
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeColon
BreakInheritanceList: BeforeColon
# Includes
SortIncludes: true
IncludeBlocks: Regroup
IncludeCategories:
# Project headers
- Regex: '^"(embedDIP|core|imgproc|device|board|wrapper)/'
Priority: 1
# C system headers
- Regex: '^<(assert|complex|ctype|errno|fenv|float|inttypes|limits|locale|math|setjmp|signal|stdalign|stdarg|stdatomic|stdbool|stddef|stdint|stdio|stdlib|stdnoreturn|string|tgmath|threads|time|uchar|wchar|wctype)\.h>'
Priority: 2
# STM32/ARM headers
- Regex: '^<(stm32|cmsis|arm_)'
Priority: 3
# C++ standard library
- Regex: '^<[a-z_]+>'
Priority: 4
# Other headers
- Regex: '.*'
Priority: 5
# Comments
ReflowComments: true
SpacesBeforeTrailingComments: 2
# Macros
MacroBlockBegin: ''
MacroBlockEnd: ''
# Penalties (for line breaking decisions)
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
# Other
MaxEmptyLinesToKeep: 2
KeepEmptyLinesAtTheStartOfBlocks: false
InsertTrailingCommas: None
# Namespace indentation
NamespaceIndentation: None
CompactNamespaces: false
# Constructor initializers
ConstructorInitializerAllOnOneLineOrOnePerLine: true
AllowAllConstructorInitializersOnNextLine: false
# Function parameters
AllowAllParametersOfDeclarationOnNextLine: false
BinPackParameters: false
BinPackArguments: false
# Preprocessor
IndentPPDirectives: BeforeHash