mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
Currently, the format enforces single lines when possible, but does not enforce readable column-based alignment (and, moreover, *removes* such manually added alignment: switch( m_orientation ) { case PIN_RIGHT: m_orientation = PIN_UP; break; case PIN_UP: m_orientation = PIN_LEFT; break; } Change this to multi-line by default: switch( m_orientation ) { case PIN_RIGHT: m_orientation = PIN_UP; break; case PIN_UP: m_orientation = PIN_LEFT; break; } If the developer wishes for column-aligned single-line cases, this is permitted, but much be done manually: switch( m_orientation ) { case PIN_RIGHT: m_orientation = PIN_DOWN; break; case PIN_UP: m_orientation = PIN_RIGHT; break; } CHANGE: the _clang-format file to reflect this, and add note about manual override in the dev docs. (cherry picked from commit 272c045c37358300011088161f4fe661398e5bb2)
54 lines
1.5 KiB
Plaintext
54 lines
1.5 KiB
Plaintext
BasedOnStyle: LLVM
|
|
AccessModifierOffset: -4
|
|
AlignAfterOpenBracket: DontAlign
|
|
AlignConsecutiveDeclarations: true
|
|
AlignEscapedNewlinesLeft: true
|
|
AlignOperands: true
|
|
AlignTrailingComments: true
|
|
AllowAllParametersOfDeclarationOnNextLine: true
|
|
AllowShortBlocksOnASingleLine: false
|
|
AllowShortCaseLabelsOnASingleLine: false
|
|
AllowShortFunctionsOnASingleLine: false
|
|
AllowShortIfStatementsOnASingleLine: false
|
|
AllowShortLoopsOnASingleLine: false
|
|
AlwaysBreakAfterReturnType: None
|
|
AlwaysBreakBeforeMultilineStrings: true
|
|
AlwaysBreakTemplateDeclarations: true
|
|
BinPackArguments: true
|
|
BinPackParameters: true
|
|
BreakBeforeBinaryOperators: NonAssignment
|
|
BreakBeforeBraces: Allman
|
|
BreakBeforeTernaryOperators: false
|
|
BreakConstructorInitializersBeforeComma: false
|
|
BreakStringLiterals: false
|
|
ColumnLimit: 100
|
|
ConstructorInitializerAllOnOneLineOrOnePerLine: true
|
|
ConstructorInitializerIndentWidth: 8
|
|
ContinuationIndentWidth: 8
|
|
Cpp11BracedListStyle: false
|
|
DerivePointerAlignment: false
|
|
DisableFormat: false
|
|
ForEachMacros: [ BOOST_FOREACH ]
|
|
IndentCaseLabels: false
|
|
IndentWidth: 4
|
|
IndentWrappedFunctionNames: false
|
|
KeepEmptyLinesAtTheStartOfBlocks: true
|
|
Language: Cpp
|
|
MaxEmptyLinesToKeep: 2
|
|
NamespaceIndentation: Inner
|
|
PointerAlignment: Left
|
|
ReflowComments: false
|
|
SortIncludes: true
|
|
SpaceAfterCStyleCast: true
|
|
SpaceBeforeAssignmentOperators: true
|
|
SpaceBeforeParens: Never
|
|
SpaceInEmptyParentheses: false
|
|
SpacesBeforeTrailingComments: 1
|
|
SpacesInAngles: false
|
|
SpacesInCStyleCastParentheses: false
|
|
SpacesInParentheses: true
|
|
SpacesInSquareBrackets: false
|
|
Standard: Cpp11
|
|
TabWidth: 4
|
|
UseTab: Never
|