.clang-format 2.3 KB
Newer Older
L
Longda 已提交
1 2 3 4 5 6
---
Language: Cpp
# BasedOnStyle:	LLVM
SortIncludes: false
AccessModifierOffset: -2
AlignAfterOpenBracket: DontAlign
羽飞's avatar
羽飞 已提交
7 8
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
L
Longda 已提交
9 10 11 12 13 14 15
DerivePointerAlignment: false
PointerAlignment: Right
ConstructorInitializerIndentWidth: 4
AlignEscapedNewlinesLeft: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: true
羽飞's avatar
羽飞 已提交
16
AllowShortFunctionsOnASingleLine: true
L
Longda 已提交
17
AllowShortIfStatementsOnASingleLine: false
羽飞's avatar
羽飞 已提交
18
AllowShortCaseLabelsOnASingleLine: true
L
Longda 已提交
19 20
AllowShortLoopsOnASingleLine: false
AlwaysBreakTemplateDeclarations: true
羽飞's avatar
羽飞 已提交
21
# false表示函数实参要么都在同一行,要么都各自一行
L
Longda 已提交
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
BinPackArguments: false
AlwaysBreakBeforeMultilineStrings: false
BreakBeforeBinaryOperators: None
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BinPackParameters: true
ColumnLimit: 120
ConstructorInitializerAllOnOneLineOrOnePerLine: true
DerivePointerBinding: true
ExperimentalAutoDetectBinPacking: false
IndentCaseLabels: true
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCSpaceBeforeProtocolList: false
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 200
PenaltyBreakString: 1000
PenaltyBreakFirstLessLess: 120
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
PointerBindsToType: true
Cpp11BracedListStyle: true
Standard:        Auto
IndentWidth:     2
TabWidth:        4
UseTab:          Never
BreakBeforeBraces: Custom
BraceWrapping:   
52
  AfterClass:      true
L
Longda 已提交
53
  AfterControlStatement: false
54
  AfterEnum:       true
L
Longda 已提交
55 56 57
  AfterFunction:   true
  AfterNamespace:  false
  AfterObjCDeclaration: false
58 59
  AfterStruct:     true
  AfterUnion:      true
L
Longda 已提交
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
  AfterExternBlock: false
  BeforeCatch:     false
  BeforeElse:      false
  IndentBraces:    false
  SplitEmptyFunction: false
  SplitEmptyRecord: false
  SplitEmptyNamespace: false
IndentFunctionDeclarationAfterType: true
SpacesInParentheses: false
SpacesInAngles: false
SpaceInEmptyParentheses: false
SpacesInCStyleCastParentheses: false
SpaceAfterControlStatementKeyword: true
SpaceBeforeAssignmentOperators: true
SpacesBeforeTrailingComments: 2
ContinuationIndentWidth: 4
CommentPragmas:  '^lint'
MacroBlockBegin: "

END_CATCH_ERROR$"
...