-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.clang-format
78 lines (75 loc) · 2.8 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
# Visual Studio generated .clang-format file
# The style options in this file are a best effort attempt to replicate the
# current IDE formatting configuration from Tools > Options. The following
# style options, however, should be verified:
# AfterFunction
---
BasedOnStyle: google
AccessModifierOffset: 0
AlignConsecutiveAssignments: Consecutive # true, false
AlignConsecutiveDeclarations: Consecutive # true, false
#AllowShortBlocksOnASingleLine: Never # Never, Empty, Always
AllowShortFunctionsOnASingleLine: None # None, InlineOnly, Empty, Inline, All
AllowShortIfStatementsOnASingleLine: Never # Never, WithoutElse, Always
AllowShortLoopsOnASingleLine: false
AlwaysBreakTemplateDeclarations: Yes # No, MultiLine, Yes
#BreakBeforeBraces: Allman # Attach, Linux, Mozilla, Stroustrup, Allman, Whitesmiths, GNU, WebKit, Custom
BreakBeforeBraces: Custom
BraceWrapping:
SplitEmptyFunction: false
AfterCaseLabel: true
AfterClass: true
AfterControlStatement : Always
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: true
BeforeCatch: true
BeforeElse: true
BeforeLambdaBody: true
BeforeWhile: true
IndentBraces: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
BreakBeforeTernaryOperators: false # true, false
BreakConstructorInitializers: BeforeComma # BeforeColon, BeforeComma, AfterColon
BreakStringLiterals: false # true, false
Cpp11BracedListStyle: false # true, false
#DeriveLineEnding: false # true, false
#DerivePointerAlignment: false # true, false
#DisableFormat: false # true, false
#ExperimentalAutoDetectBinPacking: false # true, false
#IncludeBlocks: Regroup # Preserve, Merge, Regroup
#IndentCaseBlocks: false # true, false
IndentPPDirectives: BeforeHash # None, AfterHash, BeforeHash
IndentWidth: 3
IndentWrappedFunctionNames: true # true, false
MaxEmptyLinesToKeep: 10
NamespaceIndentation: All # None, Inner, All
#PenaltyBreakAssignment:0
#PenaltyBreakBeforeFirstCallParameter:0
PenaltyBreakComment: 0
#PenaltyBreakFirstLessLess:0
#PenaltyBreakString:0
#PenaltyBreakTemplateDeclaration:0
#PenaltyExcessCharacter: 0
#PenaltyReturnTypeOnItsOwnLine: 0
PointerAlignment: Middle # Left, Middle, Right
SortIncludes: Never
SpaceAfterTemplateKeyword: false # true, false
#SpaceBeforeParens: Never # Never, ControlStatements, NonEmptyParentheses, Always
#SpaceBeforeSquareBrackets: false # true, false
#SpaceInEmptyBlock: false # true, false
SpacesBeforeTrailingComments: 4
#SpacesInConditionalStatement: false # true, false
SpacesInContainerLiterals: false # true, false
Standard: Latest # c++03, c++11, c++14, c++17, c++20, Latest, Auto
TabWidth: 3
ReflowComments: true
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
ObjCBlockIndentWidth: 4
PenaltyBreakAssignment: 4
ColumnLimit: 100
CommentPragmas: '^(/\\*\\*|/\\*!<|///|///<|//!<|//!)'