-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.clang-format
38 lines (35 loc) · 1018 Bytes
/
.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
---
Language: Cpp
BasedOnStyle: Google
PointerAlignment: Right
DerivePointerAlignment: false
AccessModifierOffset: -4
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
BraceWrapping:
AfterClass: true
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterStruct: true
AfterUnion: true
BeforeCatch: true
BeforeElse: true
AfterCaseLabel: true
AfterExternBlock: true
AfterObjCDeclaration: true
AfterControlStatement: true
BreakBeforeBraces: Attach
ColumnLimit: 120
IndentWidth: 4
TabWidth: 4
IncludeBlocks: Preserve
SpacesBeforeTrailingComments: 2 # 单行代码注释前填充两个空格
AlignConsecutiveMacros: true
AlignConsecutiveAssignments: false
Cpp11BracedListStyle: true
SpaceInEmptyBlock: true # 空代码块使用单个空格填充
# clang-format 15
RequiresClausePosition: OwnLine
IndentRequiresClause: false