This repository has been archived on 2021-03-22. You can view files and clone it, but cannot push or open issues or pull requests.
backend/.clang-format

132 lines
3.8 KiB
Plaintext
Raw Normal View History

2020-06-29 03:01:30 +02:00
# -*- mode: yaml -*-
2020-07-05 05:54:15 +02:00
# Written for clang-format 10.
# https://releases.llvm.org/10.0.0/tools/clang/docs/ClangFormatStyleOptions.html
2020-06-29 03:01:30 +02:00
---
DisableFormat: false
Language: Cpp
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
2020-10-30 21:44:43 +01:00
# AlignConsecutiveBitFields: false # clang-format 11
2020-06-29 03:01:30 +02:00
AlignConsecutiveDeclarations: false
2020-07-05 05:54:15 +02:00
AlignConsecutiveMacros: false
2020-06-29 03:01:30 +02:00
AlignEscapedNewlines: DontAlign
2020-10-30 21:44:43 +01:00
AlignOperands: true # clang-format 11: Align
2020-06-29 03:01:30 +02:00
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
2020-07-05 05:54:15 +02:00
AllowShortBlocksOnASingleLine: Empty
2020-06-29 03:01:30 +02:00
AllowShortCaseLabelsOnASingleLine: false
2020-10-30 21:44:43 +01:00
# AllowShortEnumsOnASingleLine: false # clang-format 11
2020-06-29 03:01:30 +02:00
AllowShortFunctionsOnASingleLine: Empty
2020-07-05 05:54:15 +02:00
AllowShortIfStatementsOnASingleLine: Never
2020-06-29 03:01:30 +02:00
AllowShortLambdasOnASingleLine: Inline
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
2020-10-30 21:44:43 +01:00
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: true
BinPackParameters: true
2020-06-29 03:01:30 +02:00
BraceWrapping: # If BreakBeforeBraces is set to Custom.
AfterCaseLabel: true
AfterClass: true
2020-07-05 05:54:15 +02:00
AfterControlStatement: Always
2020-06-29 03:01:30 +02:00
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: true
BeforeCatch: true
BeforeElse: true
# BeforeLambdaBody: true # clang-format 11
2020-10-30 21:44:43 +01:00
# BeforeWhile: true # clang-format 11
2020-06-29 03:01:30 +02:00
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeBraces: Custom
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeComma
BreakInheritanceList: BeforeComma
BreakStringLiterals: true
ColumnLimit: 80
# CommentPragmas: 'regex'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
2020-07-05 05:54:15 +02:00
DeriveLineEnding: true
2020-06-29 03:01:30 +02:00
DerivePointerAlignment: false
FixNamespaceComments: true
ForEachMacros:
- FOREACH
- RANGES_FOR
- Q_FOREACH
- BOOST_FOREACH
2020-10-30 21:44:43 +01:00
IncludeBlocks: Regroup
IncludeCategories: # stdlib headers into own group.
- Regex: '^[^\.]+$'
Priority: 4
# IndentCaseBlocks: false # clang-format 11
2020-06-29 03:01:30 +02:00
IndentCaseLabels: false
2020-10-30 21:44:43 +01:00
# IndentExternBlock: NoIndent # clang-format 11
2020-07-05 05:54:15 +02:00
IndentGotoLabels: false
2020-06-29 03:01:30 +02:00
IndentPPDirectives: AfterHash
IndentWidth: 4
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: true
# MacroBlockBegin: 'string'
# MacroBlockEnd: 'string'
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
# NamespaceMacros: 'string'
2020-10-30 21:44:43 +01:00
PenaltyBreakAssignment: 250
PenaltyBreakBeforeFirstCallParameter: 300
2020-06-29 03:01:30 +02:00
# PenaltyBreakComment: 300
# PenaltyBreakFirstLessLess: 120
# PenaltyBreakString: 1000
# PenaltyBreakTemplateDeclaration: 10
# PenaltyExcessCharacter: 1000000
# PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Right
2020-10-30 21:44:43 +01:00
# RawStringFormats: # <YAML>
2020-06-29 03:01:30 +02:00
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
2020-10-30 21:44:43 +01:00
SpaceAfterLogicalNot: false
2020-06-29 03:01:30 +02:00
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
2020-07-05 05:54:15 +02:00
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
2020-06-29 03:01:30 +02:00
SpaceInEmptyParentheses: false
2020-07-05 05:54:15 +02:00
SpacesBeforeTrailingComments: 1
2020-10-30 21:44:43 +01:00
SpacesInAngles: false
2020-06-29 03:01:30 +02:00
SpacesInCStyleCastParentheses: false
2020-07-05 05:54:15 +02:00
SpacesInConditionalStatement: false
2020-06-29 03:01:30 +02:00
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Auto
# StatementMacros:
# - Q_UNUSED
# - QT_REQUIRE_VERSION
TabWidth: 4
# TypenameMacros:
# - STACK_OF
# - LIST
2020-10-30 21:44:43 +01:00
UseCRLF: false
2020-06-29 03:01:30 +02:00
UseTab: Never
2020-10-30 21:44:43 +01:00
# WhitespaceSensitiveMacros: ['string', 'string'] # clang-format 11
2020-06-29 03:01:30 +02:00
...