forked from NotAShelf/rogged
chore: setup clang-format for formatting
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I322b7dd5dcd699247b58fe9f5db7bcd86a6a6964
This commit is contained in:
parent
786fce3814
commit
8f6650919d
3 changed files with 123 additions and 3 deletions
100
.clang-format
Normal file
100
.clang-format
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
# Based on LLVM style with project-specific adjustments
|
||||
---
|
||||
Language: C
|
||||
|
||||
# Indentation
|
||||
IndentWidth: 2
|
||||
TabWidth: 2
|
||||
UseTab: Never
|
||||
IndentCaseLabels: false
|
||||
IndentPPDirectives: None
|
||||
|
||||
# Line length
|
||||
ColumnLimit: 120
|
||||
|
||||
# Braces
|
||||
BreakBeforeBraces: Attach
|
||||
BraceWrapping:
|
||||
AfterFunction: false
|
||||
AfterControlStatement: false
|
||||
AfterEnum: false
|
||||
AfterStruct: false
|
||||
AfterUnion: false
|
||||
BeforeElse: false
|
||||
IndentBraces: false
|
||||
|
||||
# Alignment
|
||||
AlignConsecutiveAssignments: false
|
||||
AlignConsecutiveDeclarations: false
|
||||
AlignEscapedNewlines: Right
|
||||
AlignOperands: true
|
||||
AlignTrailingComments: true
|
||||
PointerAlignment: Right
|
||||
|
||||
# Spacing
|
||||
SpaceAfterCStyleCast: false
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInParentheses: false
|
||||
SpacesInSquareBrackets: false
|
||||
|
||||
# Line breaks
|
||||
AllowShortBlocksOnASingleLine: false
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: Empty
|
||||
AllowShortIfStatementsOnASingleLine: false
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AlwaysBreakAfterReturnType: None
|
||||
AlwaysBreakBeforeMultilineStrings: false
|
||||
BinPackArguments: true
|
||||
BinPackParameters: true
|
||||
BreakBeforeBinaryOperators: None
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakStringLiterals: true
|
||||
ContinuationIndentWidth: 4
|
||||
|
||||
# Includes
|
||||
IncludeBlocks: Preserve
|
||||
SortIncludes: false
|
||||
|
||||
# Comments
|
||||
ReflowComments: true
|
||||
SpacesBeforeTrailingComments: 2
|
||||
|
||||
# Other
|
||||
DerivePointerAlignment: false
|
||||
DisableFormat: false
|
||||
ExperimentalAutoDetectBinPacking: false
|
||||
FixNamespaceComments: false
|
||||
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||
MacroBlockBegin: ''
|
||||
MacroBlockEnd: ''
|
||||
MaxEmptyLinesToKeep: 2
|
||||
NamespaceIndentation: None
|
||||
ObjCBlockIndentWidth: 2
|
||||
ObjCSpaceAfterProperty: false
|
||||
ObjCSpaceBeforeProtocolList: true
|
||||
PenaltyBreakBeforeFirstCallParameter: 19
|
||||
PenaltyBreakComment: 300
|
||||
PenaltyBreakFirstLessLess: 120
|
||||
PenaltyBreakString: 1000
|
||||
PenaltyExcessCharacter: 1000000
|
||||
PenaltyReturnTypeOnItsOwnLine: 60
|
||||
SpaceAfterTemplateKeyword: true
|
||||
SpaceBeforeInheritanceColon: true
|
||||
SpaceBeforeCtorInitializerColon: true
|
||||
SpaceBeforeRangeBasedForLoopColon: true
|
||||
SpaceBeforeSquareBrackets: false
|
||||
SpacesInAngles: false
|
||||
StatementMacros:
|
||||
- Q_UNUSED
|
||||
- QT_REQUIRE_VERSION
|
||||
TypenameMacros:
|
||||
- STACK_OF
|
||||
- LIST
|
||||
- DECLARE_STACK_OF
|
||||
- DECLARE_LIST
|
||||
- IMPLEMENT_STACK_OF
|
||||
- IMPLEMENT_LIST
|
||||
Loading…
Add table
Add a link
Reference in a new issue