Files
mcaselector-lite/.clang-format
Quinn 8a01cd3a47 Update files' copyright headers (final time, promice)
This should be the end of the identity crisis with files' copyright
headers/disclosures.
We shall not be using names in the headers, since this does not make
sense, this is covered by the git logs, and is preferred.

The following commit will tackle the CONTRIBUTORS file, to specify how
it should be generated.
2026-02-05 12:15:48 +01:00

188 lines
5.6 KiB
YAML

---
# ---------------------------
# general style settings
# ---------------------------
BasedOnStyle: GNU
Standard: Auto
ColumnLimit: 0
LineEnding: LF
UseTab: ForContinuationAndIndentation
TabWidth: 8
IndentWidth: 8
ContinuationIndentWidth: 8
AccessModifierOffset: -4
# ---------------------------
# alignment options
# ---------------------------
AlignAfterOpenBracket: DontAlign
AlignOperands: DontAlign
AlignTrailingComments: true
AlignConsecutiveMacros: Consecutive
AlignEscapedNewlines: Left
AlignArrayOfStructures: Left
AlignConsecutiveAssignments: Consecutive
AlignConsecutiveBitFields: Consecutive
AlignConsecutiveDeclarations: Consecutive
AlignConsecutiveShortCaseStatements:
Enabled: true
# ---------------------------
# short constructs on a single line
# ---------------------------
AllowShortBlocksOnASingleLine: Always
AllowShortFunctionsOnASingleLine: All
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: true
AllowShortEnumsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
# ---------------------------
# break and wrapping options
# ---------------------------
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakAfterReturnType: Automatic
BreakTemplateDeclarations: false
BreakBeforeBinaryOperators: None
BreakBeforeConceptDeclarations: Never
BreakBeforeBraces: Custom
BreakBeforeTernaryOperators: false
BreakStringLiterals: false
# ---------------------------
# brace wrapping configuration
# ---------------------------
BraceWrapping:
AfterControlStatement: Never
AfterCaseLabel: false
AfterClass: false
AfterEnum: false
AfterFunction: true
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
# ---------------------------
# constructor initializer and parameter packing options
# ---------------------------
ConstructorInitializerIndentWidth: 8
PackConstructorInitializers: NextLine
BinPackParameters: true
BinPackArguments: true
# ---------------------------
# pointer alignment
# ---------------------------
DerivePointerAlignment: false
PointerAlignment: Right
ReferenceAlignment: Pointer
QualifierAlignment: Left
# ---------------------------
# include settings and sorting
# ---------------------------
IncludeIsMainSourceRegex: ''
IncludeIsMainRegex: '([-_](test|unittest))?$'
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^<.*\.h>'
Priority: 2
SortPriority: 0
CaseSensitive: true
- Regex: '^".*'
Priority: 3
SortPriority: 0
CaseSensitive: true
# ---------------------------
# additional formatting and sorting details
# ---------------------------
FixNamespaceComments: false
MaxEmptyLinesToKeep: 2
ReflowComments: true
RemoveBracesLLVM: false
AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
ExperimentalAutoDetectBinPacking: false
SeparateDefinitionBlocks: Leave
ShortNamespaceLines: 1
SortIncludes: CaseSensitive
SortJavaStaticImport: Before
SortUsingDeclarations: false
# ---------------------------
# spacing options
# ---------------------------
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
Cpp11BracedListStyle: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: true
SpacesInParens: Custom
SpacesInParensOptions:
ExceptDoubleParentheses: false
InConditionalStatements: false
InCStyleCasts: false
Other: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: Never
SpacesInConditionalStatement: false
SpacesInContainerLiterals: false
SpacesInCStyleCastParentheses: false
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: 1
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
BitFieldColonSpacing: Both
# ---------------------------
# penalty settings
# ---------------------------
PenaltyBreakAssignment: 2000
PenaltyBreakBeforeFirstCallParameter: 5000
PenaltyBreakBeforeMemberAccess: 2000
PenaltyBreakComment: 1000
PenaltyBreakFirstLessLess: 1500
PenaltyBreakOpenParenthesis: 5000
PenaltyBreakScopeResolution: 2000
PenaltyBreakString: 2000
PenaltyBreakTemplateDeclaration: 3000
PenaltyExcessCharacter: 100
PenaltyIndentedWhitespace: 0
PenaltyReturnTypeOnItsOwnLine: 10000
# ---------------------------
# indentation details
# ---------------------------
IndentAccessModifiers: false
IndentCaseLabels: false
IndentCaseBlocks: false
IndentGotoLabels: false
IndentExternBlock: AfterExternBlock
IndentRequiresClause: false
IndentPPDirectives: None
PPIndentWidth: 1
...