add .clang-format
This commit is contained in:
140
c_os/.clang-format
Normal file
140
c_os/.clang-format
Normal file
@ -0,0 +1,140 @@
|
|||||||
|
---
|
||||||
|
BasedOnStyle: WebKit
|
||||||
|
|
||||||
|
AccessModifierOffset: '-4'
|
||||||
|
AlignAfterOpenBracket: Align
|
||||||
|
|
||||||
|
# Don't vertically align too much to not fuck with VC
|
||||||
|
AlignArrayOfStructures: None
|
||||||
|
AlignConsecutiveAssignments: None
|
||||||
|
AlignConsecutiveBitFields: None
|
||||||
|
AlignConsecutiveDeclarations: None
|
||||||
|
AlignConsecutiveMacros: None
|
||||||
|
AlignEscapedNewlines: DontAlign
|
||||||
|
|
||||||
|
AlignOperands: AlignAfterOperator
|
||||||
|
AlignTrailingComments: 'true'
|
||||||
|
AllowAllArgumentsOnNextLine: 'false'
|
||||||
|
# DEPRECATED: AllowAllConstructorInitializersOnNextLine: 'true'
|
||||||
|
AllowAllParametersOfDeclarationOnNextLine: 'false'
|
||||||
|
|
||||||
|
# Allow single line stuff
|
||||||
|
AllowShortBlocksOnASingleLine: Always
|
||||||
|
AllowShortCaseLabelsOnASingleLine: 'true'
|
||||||
|
AllowShortEnumsOnASingleLine: 'true'
|
||||||
|
AllowShortFunctionsOnASingleLine: All
|
||||||
|
AllowShortIfStatementsOnASingleLine: AllIfsAndElse
|
||||||
|
AllowShortLambdasOnASingleLine: All
|
||||||
|
AllowShortLoopsOnASingleLine: 'true'
|
||||||
|
AlwaysBreakAfterReturnType: None
|
||||||
|
AlwaysBreakBeforeMultilineStrings: 'false'
|
||||||
|
AlwaysBreakTemplateDeclarations: 'No'
|
||||||
|
|
||||||
|
# Don't force single line for each
|
||||||
|
BinPackArguments: 'true'
|
||||||
|
BinPackParameters: 'true'
|
||||||
|
|
||||||
|
BitFieldColonSpacing: Both
|
||||||
|
BreakBeforeBinaryOperators: None
|
||||||
|
|
||||||
|
# Braces completely attached, should be the same as BreakBeforeBraces: Attach
|
||||||
|
BreakBeforeBraces: Custom
|
||||||
|
BraceWrapping:
|
||||||
|
AfterCaseLabel: 'false'
|
||||||
|
AfterClass: 'false'
|
||||||
|
AfterControlStatement: Never
|
||||||
|
AfterEnum: 'false'
|
||||||
|
AfterFunction: 'false'
|
||||||
|
AfterNamespace: 'false'
|
||||||
|
AfterStruct: 'false'
|
||||||
|
AfterUnion: 'false'
|
||||||
|
AfterExternBlock: 'false'
|
||||||
|
BeforeCatch: 'false'
|
||||||
|
BeforeElse: 'false'
|
||||||
|
BeforeLambdaBody: 'false'
|
||||||
|
BeforeWhile: 'false'
|
||||||
|
IndentBraces: 'false'
|
||||||
|
SplitEmptyFunction: 'false'
|
||||||
|
SplitEmptyRecord: 'false'
|
||||||
|
SplitEmptyNamespace: 'false'
|
||||||
|
|
||||||
|
BreakBeforeConceptDeclarations: 'false'
|
||||||
|
BreakBeforeTernaryOperators: 'true'
|
||||||
|
BreakConstructorInitializers: BeforeColon
|
||||||
|
BreakInheritanceList: BeforeColon
|
||||||
|
BreakStringLiterals: 'false'
|
||||||
|
ColumnLimit: '0'
|
||||||
|
CompactNamespaces: 'false'
|
||||||
|
# DEPRECATED: ConstructorInitializerAllOnOneLineOrOnePerLine: 'false'
|
||||||
|
ConstructorInitializerIndentWidth: '2'
|
||||||
|
ContinuationIndentWidth: '2'
|
||||||
|
Cpp11BracedListStyle: 'true'
|
||||||
|
|
||||||
|
# Force my style onto everything :)
|
||||||
|
DeriveLineEnding: 'false'
|
||||||
|
DerivePointerAlignment: 'false'
|
||||||
|
|
||||||
|
DisableFormat: 'false'
|
||||||
|
EmptyLineAfterAccessModifier: Never
|
||||||
|
EmptyLineBeforeAccessModifier: Always
|
||||||
|
ExperimentalAutoDetectBinPacking: 'false'
|
||||||
|
FixNamespaceComments: 'true'
|
||||||
|
IncludeBlocks: Preserve
|
||||||
|
IndentAccessModifiers: 'false' # don't indent, use AccessModifierOffset instead
|
||||||
|
IndentCaseBlocks: 'false'
|
||||||
|
IndentCaseLabels: 'false'
|
||||||
|
IndentExternBlock: Indent
|
||||||
|
IndentGotoLabels: 'false'
|
||||||
|
IndentPPDirectives: None
|
||||||
|
IndentRequires: 'false'
|
||||||
|
IndentWidth: '4'
|
||||||
|
IndentWrappedFunctionNames: 'false'
|
||||||
|
# TODO: InsertBraces: 'true'
|
||||||
|
KeepEmptyLinesAtTheStartOfBlocks: 'true'
|
||||||
|
LambdaBodyIndentation: Signature
|
||||||
|
Language: Cpp
|
||||||
|
MaxEmptyLinesToKeep: '1'
|
||||||
|
NamespaceIndentation: All
|
||||||
|
PointerAlignment: Left
|
||||||
|
PPIndentWidth: -1 # use IndentWidth
|
||||||
|
# TODO: PackConstructorInitializers: NextLine
|
||||||
|
# TODO: QualifierAlignment: Leave
|
||||||
|
ReferenceAlignment: Left
|
||||||
|
ReflowComments: 'false'
|
||||||
|
# TODO: RemoveBracesLLVM: 'false'
|
||||||
|
# TODO: RequiresClausePosition: WithPreceding
|
||||||
|
# TODO: SeparateDefinitionBlocks: Always
|
||||||
|
ShortNamespaceLines: 0
|
||||||
|
SortIncludes: CaseInsensitive
|
||||||
|
SortUsingDeclarations: 'true'
|
||||||
|
SpaceAfterCStyleCast: 'false'
|
||||||
|
SpaceAfterLogicalNot: 'false'
|
||||||
|
SpaceAfterTemplateKeyword: 'false'
|
||||||
|
SpaceAroundPointerQualifiers: Default
|
||||||
|
SpaceBeforeAssignmentOperators: 'true'
|
||||||
|
SpaceBeforeCaseColon: 'false'
|
||||||
|
SpaceBeforeCpp11BracedList: 'true'
|
||||||
|
SpaceBeforeCtorInitializerColon: 'true'
|
||||||
|
SpaceBeforeInheritanceColon: 'true'
|
||||||
|
SpaceBeforeParens: ControlStatements
|
||||||
|
SpaceBeforeRangeBasedForLoopColon: 'true'
|
||||||
|
SpaceInEmptyBlock: 'false'
|
||||||
|
SpaceInEmptyParentheses: 'false'
|
||||||
|
SpacesBeforeTrailingComments: '2'
|
||||||
|
SpacesInAngles: Never
|
||||||
|
SpacesInCStyleCastParentheses: 'false'
|
||||||
|
SpacesInConditionalStatement: 'false'
|
||||||
|
SpacesInContainerLiterals: 'false'
|
||||||
|
|
||||||
|
SpacesInLineCommentPrefix:
|
||||||
|
Minimum: '1'
|
||||||
|
Maximum: '1'
|
||||||
|
|
||||||
|
SpacesInParentheses: 'false'
|
||||||
|
SpacesInSquareBrackets: 'false'
|
||||||
|
Standard: c++20
|
||||||
|
TabWidth: '4'
|
||||||
|
UseCRLF: 'false'
|
||||||
|
UseTab: Never
|
||||||
|
|
||||||
|
...
|
||||||
Reference in New Issue
Block a user