forked from sambacha/dune-snippets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.clang-format
138 lines (117 loc) · 2.88 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# Clang-Format Configuration
---
BasedOnStyle: LLVM
# Indent
ConstructorInitializerIndentWidth: 2
ContinuationIndentWidth: 2
IndentPPDirectives: AfterHash
# Alignment
AlignAfterOpenBracket: AlwaysBreak
AlignEscapedNewlines: Left
AlignOperands: DontAlign
PointerAlignment: Left
# Breaks
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Empty
AllowShortFunctionsOnASingleLine: Empty
AllowShortLambdasOnASingleLine: Empty
AllowShortLoopsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: Never
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
AfterClass: true
AfterControlStatement: MultiLine
AfterFunction: true
AfterStruct: true
AfterUnion: true
BeforeCatch: true
BeforeElse: false
BeforeLambdaBody: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
BreakBeforeBraces: Custom
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 2
# Spaces
Cpp11BracedListStyle: false
SpacesInContainerLiterals: false
# Columns
ColumnLimit: 100
PenaltyBreakAssignment: 100
PenaltyBreakBeforeFirstCallParameter: 10
PenaltyBreakComment: 100
PenaltyBreakFirstLessLess: 100
PenaltyBreakString: 1000
PenaltyExcessCharacter: 10
PenaltyReturnTypeOnItsOwnLine: 10000
# Comments
ReflowComments: false
SpacesBeforeTrailingComments: 2
CommentPragmas: '^ (NOTE|TODO):'
# Sorting
SortUsingDeclarations: false
# Line Endings
DeriveLineEnding: false
UseCRLF: false
---
Language: Cpp
Standard: c++20
# Includes
SortIncludes: true
IncludeBlocks: Preserve
IncludeCategories:
# Relative Paths
- Regex: '^"'
Priority: 1
# Windows Core Headers
- Regex: '^<(ntifs|windows)\.h>'
Priority: 2
# Windows Driver Headers
- Regex: '^<(ntddk|wdm)\.h>'
Priority: 3
# Windows Headers
- Regex: '^<(wdf|shellapi|winsock2|ws2tcpip|mswsock)\.h>'
Priority: 4
# GTest Headers
- Regex: '^<(gtest|gmock)/'
Priority: 5
SortPriority: 0
# Library Headers
- Regex: '^<.*\.'
Priority: 6
# C Compatibility Headers
- Regex: '^<c(a|c|e|f|i|l|m|s|t|u|w)'
Priority: 8
# C++ Standard Library Headers
- Regex: '^<'
Priority: 7
# Sources: a.hpp is main include for a.cpp, a_test.cpp, etc.
IncludeIsMainRegex: '(_test|_win32|_posix)?$'
# Headers: a.hpp, a_base.hpp, etc. are main includes for a.cpp
IncludeIsMainSourceRegex: '(_base|_impl)?$'
# Macros
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
MacroBlockBegin: '^BEGIN_(MSG_MAP|MSG_MAP_EX|UPDATE_UI_MAP)'
MacroBlockEnd: '^END_(MSG_MAP|UPDATE_UI_MAP)'
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
---
Language: ObjC
DisableFormat: true
---
Language: Java
BreakAfterJavaFieldAnnotations: true
---
Language: JavaScript
JavaScriptQuotes: Double
JavaScriptWrapImports: true