-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.clang-format
80 lines (68 loc) · 2.08 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
# This file is a part of [tsnl/cpp_base](https://github.com/tsnl/cpp_base).
# If you make any changes here, please consider upstreaming them so that other projects can consistently follow the same
# style.
BasedOnStyle: LLVM
IndentWidth: 4
DerivePointerAlignment: false
PointerAlignment: Left
ColumnLimit: 120
# Common:
ContinuationIndentWidth: 4
BreakBeforeBraces: Attach
SeparateDefinitionBlocks: Always
AllowShortBlocksOnASingleLine: Never
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: Inline
AllowShortLoopsOnASingleLine: false
AlwaysBreakBeforeMultilineStrings: true
QualifierAlignment: Right
# Templates:
BreakBeforeConceptDeclarations: Always
AlwaysBreakTemplateDeclarations: true
# Requires:
AllowShortCompoundRequirementOnASingleLine: true
IndentRequiresClause: false
RequiresClausePosition: SingleLine
# Type definitions:
AllowShortEnumsOnASingleLine: false
# Arguments and Parameters:
AlignAfterOpenBracket: BlockIndent
AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
BinPackArguments: false
BinPackParameters: false
# Constructors:
BreakConstructorInitializers: BeforeColon
PackConstructorInitializers: Never
SpaceBeforeCtorInitializerColon: false
ConstructorInitializerIndentWidth: 0
# Namespaces:
FixNamespaceComments: true
ShortNamespaceLines: 0
NamespaceIndentation: Inner
# Misc:
BitFieldColonSpacing: After
AccessModifierOffset: -4
EmptyLineBeforeAccessModifier: Always
# Attributes:
BreakAfterAttributes: Always
# Includes:
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^"gtest\/gtest.h"$'
Priority: 1000
- Regex: '^"[^\/"]*"$'
Priority: 200
- Regex: '^"[^"]*"$'
Priority: 300
- Regex: '^<(cstdlib|cstddef|cstdio|cstdint|cctype|cassert)>$'
Priority: 600
# Everything that didn't match
- Regex: '^<[^>\.\/]+>$'
Priority: 500
- Regex: '^<[^>]+>$'
Priority: 400
# Everything that didn't match
- Regex: '.*'
Priority: 1000