2024-11-03 05:24:14 +08:00
|
|
|
---
|
2020-05-15 06:15:35 +08:00
|
|
|
Language: Cpp
|
|
|
|
BasedOnStyle: LLVM
|
|
|
|
|
2024-11-03 05:24:14 +08:00
|
|
|
ColumnLimit: 120
|
|
|
|
UseTab: ForContinuationAndIndentation
|
2020-05-15 06:15:35 +08:00
|
|
|
ConstructorInitializerIndentWidth: 4
|
|
|
|
ContinuationIndentWidth: 4
|
2024-11-03 05:24:14 +08:00
|
|
|
TabWidth: 4
|
2020-05-15 06:15:35 +08:00
|
|
|
IndentCaseLabels: true
|
2024-11-03 05:24:14 +08:00
|
|
|
IndentWidth: 4
|
2020-05-15 06:15:35 +08:00
|
|
|
|
2024-11-03 05:24:14 +08:00
|
|
|
# Spacing rules
|
|
|
|
SpaceAfterCStyleCast: true
|
|
|
|
SpaceAfterLogicalNot: false
|
|
|
|
SpaceAfterTemplateKeyword: true
|
|
|
|
SpaceBeforeAssignmentOperators: true
|
|
|
|
SpaceBeforeCpp11BracedList: true
|
|
|
|
SpaceBeforeCtorInitializerColon: true
|
|
|
|
SpaceBeforeInheritanceColon: true
|
|
|
|
SpaceBeforeParens: ControlStatements
|
|
|
|
SpaceBeforeRangeBasedForLoopColon: true
|
|
|
|
SpaceInEmptyParentheses: false
|
|
|
|
SpacesBeforeTrailingComments: 2
|
|
|
|
SpacesInLineCommentPrefix:
|
|
|
|
Minimum: 1
|
|
|
|
Maximum: 1
|
|
|
|
SpacesInAngles: false
|
|
|
|
SpacesInContainerLiterals: false
|
|
|
|
SpacesInCStyleCastParentheses: false
|
|
|
|
SpacesInParentheses: false
|
|
|
|
SpacesInSquareBrackets: false
|
|
|
|
SpaceBeforeSquareBrackets: false
|
|
|
|
|
|
|
|
# # Ensure spaces after commas
|
|
|
|
# SpaceAfterComma: true
|
|
|
|
|
|
|
|
# Bracing and alignment
|
|
|
|
# BreakBeforeBraces: Allman
|
2020-05-15 06:15:35 +08:00
|
|
|
BreakBeforeBraces: Custom
|
|
|
|
BraceWrapping:
|
2024-11-03 05:24:14 +08:00
|
|
|
AfterCaseLabel: true
|
2020-05-15 06:15:35 +08:00
|
|
|
AfterClass: true
|
2024-11-03 05:24:14 +08:00
|
|
|
AfterControlStatement: Always
|
2020-05-15 06:15:35 +08:00
|
|
|
AfterEnum: true
|
|
|
|
AfterExternBlock: true
|
|
|
|
AfterFunction: true
|
|
|
|
AfterNamespace: true
|
|
|
|
AfterStruct: true
|
|
|
|
AfterUnion: true
|
|
|
|
BeforeCatch: true
|
|
|
|
BeforeElse: true
|
2024-11-03 05:24:14 +08:00
|
|
|
BeforeLambdaBody: true
|
|
|
|
BeforeWhile: true
|
2020-05-15 06:15:35 +08:00
|
|
|
IndentBraces: false
|
|
|
|
SplitEmptyFunction: true
|
|
|
|
SplitEmptyRecord: true
|
2024-11-03 05:24:14 +08:00
|
|
|
SplitEmptyNamespace: true
|
|
|
|
AllowShortCaseLabelsOnASingleLine: true
|
|
|
|
AllowShortCaseExpressionOnASingleLine: true
|
|
|
|
AlignConsecutiveShortCaseStatements:
|
|
|
|
Enabled: true
|
|
|
|
AcrossEmptyLines: true
|
|
|
|
AcrossComments: true
|
|
|
|
AlignCaseColons: false
|
|
|
|
AlignOperands: DontAlign
|
|
|
|
AlignConsecutiveAssignments: false
|
|
|
|
AlignConsecutiveDeclarations: false
|
|
|
|
AlignEscapedNewlines: Left
|
|
|
|
AlignTrailingComments: false
|
|
|
|
AlignAfterOpenBracket: BlockIndent
|
|
|
|
|
|
|
|
# Function declarations
|
|
|
|
BinPackParameters: false
|
|
|
|
AllowShortFunctionsOnASingleLine: Inline
|
|
|
|
AllowAllParametersOfDeclarationOnNextLine: false
|
|
|
|
ExperimentalAutoDetectBinPacking: false
|
|
|
|
|
|
|
|
# Line breaks
|
|
|
|
KeepEmptyLines:
|
|
|
|
AtEndOfFile: false
|
|
|
|
AtStartOfBlock: true
|
|
|
|
AtStartOfFile: true
|
|
|
|
MaxEmptyLinesToKeep: 5
|
|
|
|
|
|
|
|
# Misc
|
|
|
|
AllowAllArgumentsOnNextLine: false
|
|
|
|
BinPackArguments: false
|
|
|
|
BreakConstructorInitializers: AfterColon
|
|
|
|
BreakInheritanceList: AfterComma
|
|
|
|
PackConstructorInitializers: NextLineOnly
|
|
|
|
PointerAlignment: Middle
|
|
|
|
SortIncludes: false
|
|
|
|
PenaltyReturnTypeOnItsOwnLine: 1000000
|
|
|
|
InsertNewlineAtEOF: true
|
2020-05-15 06:15:35 +08:00
|
|
|
|
|
|
|
# Always include globals first
|
|
|
|
IncludeCategories:
|
|
|
|
- Regex: 'Globals.h'
|
|
|
|
Priority: -1
|