-
Notifications
You must be signed in to change notification settings - Fork 0
/
.clang-format
44 lines (40 loc) · 1.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
# version 14.0.0: https://releases.llvm.org/14.0.0/tools/clang/docs/ClangFormatStyleOptions.html
# latest: https://clang.llvm.org/docs/ClangFormatStyleOptions.html
# generals
BreakBeforeBraces: Attach
ColumnLimit: 80
CommentPragmas: "^ NO-FORMAT:"
ContinuationIndentWidth: 2
IndentWidth: 2
ReflowComments: false
UseTab: Never
# language core
# AlwaysBreakAfterReturnType: All
AlwaysBreakTemplateDeclarations: true
BreakBeforeBinaryOperators: NonAssignment
BreakConstructorInitializers: BeforeColon
ConstructorInitializerIndentWidth: 2
FixNamespaceComments: true
NamespaceIndentation: All
PointerAlignment: Left
# short description
# AllowShortCaseLabelsOnASingleLine: true
# AllowShortEnumsOnASingleLine: true
# AllowShortLoopsOnASingleLine: true
# AllowShortBlocksOnASingleLine: Always # Never, Empty, Always
# AllowShortFunctionsOnASingleLine: Empty # None, InlineOnly, Empty, Inline, All
# AllowShortIfStatementsOnASingleLine: WithoutElse # Never, WithoutElse, Always
# AllowShortLambdasOnASingleLine: All # None, Empty, Inline, All
IncludeCategories:
# Headers in <> without extension.
- Regex: '<([A-Za-z0-9\/-_])+>'
Priority: 1
# Headers in <> from specific external libraries.
- Regex: '<(boost|catch2|gsl)\/([A-Za-z0-9.\/-_])+>'
Priority: 2
# Headers in <> with extension.
- Regex: '<([A-Za-z0-9.\/-_])+>'
Priority: 3
# Headers in "" with extension.
- Regex: '"([A-Za-z0-9.\/-_])+"'
Priority: 4