mirror of
https://github.com/avast/retdec.git
synced 2024-11-23 13:00:13 +00:00
f4f30215aa
Currently, there is no code convention enforced in RetDec. The result of this is that every file has it's own pseudo convention which is not really followed even in the scope of the file. This commit provides definition of a .clang-format that enforces formatting rules throught the RetDec repository.
79 lines
2.3 KiB
YAML
79 lines
2.3 KiB
YAML
---
|
|
Language: Cpp
|
|
AccessModifierOffset: -4
|
|
AlignAfterOpenBracket: AlwaysBreak
|
|
AlignEscapedNewlines: Left
|
|
AlignOperands: AlignAfterOperator
|
|
AlignTrailingComments: true
|
|
AllowShortBlocksOnASingleLine: Never
|
|
AllowShortCaseLabelsOnASingleLine: true
|
|
AllowShortFunctionsOnASingleLine: Empty
|
|
AllowShortIfStatementsOnASingleLine: Never
|
|
AllowShortIfStatementsOnASingleLine: true
|
|
AllowShortLoopsOnASingleLine: false
|
|
AlwaysBreakBeforeMultilineStrings: true
|
|
AlwaysBreakTemplateDeclarations: false
|
|
AlwaysBreakTemplateDeclarations: true
|
|
BinPackArguments: false
|
|
BinPackParameters: false
|
|
BraceWrapping:
|
|
AfterNamespace: false
|
|
AfterClass: false
|
|
AfterEnum: true
|
|
AfterStruct: true
|
|
AfterControlStatement: Always
|
|
AfterFunction: true
|
|
AfterExternBlock: false
|
|
BeforeCatch: true
|
|
BeforeElse: true
|
|
BeforeLambdaBody: false
|
|
BeforeWhile: true
|
|
SplitEmptyFunction: false
|
|
BreakBeforeBinaryOperators: NonAssignment
|
|
BreakBeforeBraces: Custom
|
|
BreakBeforeTernaryOperators: true
|
|
BreakConstructorInitializers: AfterColon
|
|
ColumnLimit: 120
|
|
CommentPragmas: '^ IWYU pragma:'
|
|
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
|
ConstructorInitializerIndentWidth: 4
|
|
ContinuationIndentWidth: 4
|
|
Cpp11BracedListStyle: true
|
|
DerivePointerAlignment: false
|
|
EmptyLineBeforeAccessModifier: LogicalBlock
|
|
FixNamespaceComments: true
|
|
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
|
|
IndentCaseLabels: false
|
|
IndentFunctionDeclarationAfterType: false
|
|
IndentWidth: 4
|
|
IndentWrappedFunctionNames: false
|
|
KeepEmptyLinesAtTheStartOfBlocks: false
|
|
MaxEmptyLinesToKeep: 2
|
|
NamespaceIndentation: None
|
|
PenaltyBreakBeforeFirstCallParameter: 79
|
|
PenaltyBreakComment: 300
|
|
PenaltyBreakFirstLessLess: 120
|
|
PenaltyBreakString: 1000
|
|
PenaltyExcessCharacter: 1000000
|
|
PenaltyReturnTypeOnItsOwnLine: 60
|
|
PointerAlignment: Left
|
|
SpaceAfterCStyleCast: false
|
|
SpaceBeforeAssignmentOperators: true
|
|
SpaceBeforeCaseColon: false
|
|
SpaceBeforeCtorInitializerColon: false
|
|
SpaceBeforeInheritanceColon: true
|
|
SpaceBeforeParens: ControlStatements
|
|
SpaceBeforeRangeBasedForLoopColon: false
|
|
SpaceBeforeSquareBrackets: false
|
|
SpaceInEmptyParentheses: false
|
|
SpacesBeforeTrailingComments: 1
|
|
SpacesInAngles: false
|
|
SpacesInContainerLiterals: false
|
|
SpacesInCStyleCastParentheses: false
|
|
SpacesInParentheses: false
|
|
SpacesInSquareBrackets: false
|
|
Standard: Auto
|
|
TabWidth: 4
|
|
UseTab: ForContinuationAndIndentation
|
|
...
|