remove comments from clang-format

This commit is contained in:
2025-07-02 23:58:06 +02:00
parent 27cacb055c
commit 84439a56f6

View File

@@ -2,35 +2,35 @@
# --------------------------- # ---------------------------
# general style settings # general style settings
# --------------------------- # ---------------------------
BasedOnStyle: '' # (LLVM,Google,Chromium,Mozilla,WebKit,Microsoft,GNU,InheritParentConfig) BasedOnStyle: ''
Standard: Auto # automatically detect the language version Standard: Auto
ColumnLimit: 0 # 0: disable column limit ColumnLimit: 0
LineEnding: LF # use LF line endings LineEnding: LF
UseTab: ForContinuationAndIndentation # (Never,ForIndentation,ForContinuationAndIndentation,Always) UseTab: ForContinuationAndIndentation
TabWidth: 4 # recommended to set this equal to IndentWidth TabWidth: 4
IndentWidth: 4 # how wide each indent is IndentWidth: 4
ContinuationIndentWidth: 4 # width for a line continuation ContinuationIndentWidth: 4
# --------------------------- # ---------------------------
# alignment options # alignment options
# --------------------------- # ---------------------------
AlignAfterOpenBracket: DontAlign # (Align,DontAlign,AlwaysBreak,BlockIndent) AlignAfterOpenBracket: DontAlign
AlignArrayOfStructures: Left # (Left,Right,None) AlignArrayOfStructures: Left
AlignConsecutiveMacros: AcrossEmptyLines # (None,Consecutive,AcrossEmptyLines,AcrossComments,AcrossEmptyLinesAndComments) AlignConsecutiveMacros: AcrossEmptyLines
AlignConsecutiveAssignments: None # (None,Consecutive,AcrossEmptyLines,AcrossComments,AcrossEmptyLinesAndComments) AlignConsecutiveAssignments: None
AlignConsecutiveBitFields: AcrossEmptyLines # (None,Consecutive,AcrossEmptyLines,AcrossComments,AcrossEmptyLinesAndComments) AlignConsecutiveBitFields: AcrossEmptyLines
AlignConsecutiveDeclarations: None # (None,Consecutive,AcrossEmptyLines,AcrossComments,AcrossEmptyLinesAndComments) AlignConsecutiveDeclarations: None
AlignEscapedNewlines: Left # (DontAlign,Left,LeftWithLastLine,Right) AlignEscapedNewlines: Left
AlignOperands: DontAlign # (DontAlign,Align,AlignAfterOperator) AlignOperands: DontAlign
AlignTrailingComments: Always # (Leave,Always,Never) AlignTrailingComments: Always
# --------------------------- # ---------------------------
# short constructs on a single line # short constructs on a single line
# --------------------------- # ---------------------------
AllowShortBlocksOnASingleLine: Always # (Never,Empty,Always) AllowShortBlocksOnASingleLine: Always
AllowShortFunctionsOnASingleLine: All # (None,InlineOnly,Empty,All) AllowShortFunctionsOnASingleLine: All
AllowShortLambdasOnASingleLine: All # (None,Empty,Inline,All) AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: AllIfsAndElse # (Never,WithoutElse,OnlyFirstIf,AllIfsAndElse) AllowShortIfStatementsOnASingleLine: AllIfsAndElse
AllowShortCaseLabelsOnASingleLine: true AllowShortCaseLabelsOnASingleLine: true
AllowShortEnumsOnASingleLine: true AllowShortEnumsOnASingleLine: true
AllowShortLoopsOnASingleLine: true AllowShortLoopsOnASingleLine: true
@@ -38,14 +38,14 @@ AllowShortLoopsOnASingleLine: true
# --------------------------- # ---------------------------
# break and wrapping options # break and wrapping options
# --------------------------- # ---------------------------
AlwaysBreakBeforeMultilineStrings: true # when defining multi-line strings, linebreak should be inserted AlwaysBreakBeforeMultilineStrings: true
BreakAfterReturnType: Automatic # is decided by PenaltyReturnTypeOnItsOwnLine BreakAfterReturnType: Automatic
BreakTemplateDeclarations: MultiLine # (Leave,No,MultiLine,Yes) BreakTemplateDeclarations: MultiLine
BreakBeforeBinaryOperators: None # (None,NonAssignment,All) BreakBeforeBinaryOperators: None
BreakBeforeConceptDeclarations: Never # (Never,Allowed,Always) BreakBeforeConceptDeclarations: Never
BreakBeforeBraces: Attach # (Attach,Linux,Mozilla,Stroustrup,Allman,Whitesmiths,GNU,WebKit,Custom) BreakBeforeBraces: Attach
BreakInheritanceList: BeforeColon # (BeforeColon,BeforeComma,AfterColon) BreakInheritanceList: BeforeColon
BreakConstructorInitializers: BeforeColon # (BeforeColon,BeforeComma,AfterColon) BreakConstructorInitializers: BeforeColon
BreakBeforeTernaryOperators: true BreakBeforeTernaryOperators: true
BreakStringLiterals: true BreakStringLiterals: true
@@ -53,7 +53,7 @@ BreakStringLiterals: true
# brace wrapping configuration # brace wrapping configuration
# --------------------------- # ---------------------------
BraceWrapping: BraceWrapping:
AfterControlStatement: Never # (Never,MultiLine,Always) AfterControlStatement: Never
AfterCaseLabel: false AfterCaseLabel: false
AfterClass: false AfterClass: false
AfterEnum: false AfterEnum: false
@@ -76,30 +76,30 @@ BraceWrapping:
# constructor initializer and parameter packing options # constructor initializer and parameter packing options
# --------------------------- # ---------------------------
ConstructorInitializerIndentWidth: 4 ConstructorInitializerIndentWidth: 4
PackConstructorInitializers: BinPack # (Never,BinPack,CurrentLine,NextLine,NextLineOnly) PackConstructorInitializers: BinPack
BinPackParameters: true # use bin-packing for paramter lists BinPackParameters: true
BinPackArguments: false # false: function calls either on one line or one per line BinPackArguments: false
# --------------------------- # ---------------------------
# pointer alignment # pointer alignment
# --------------------------- # ---------------------------
DerivePointerAlignment: false # automatically detect pointer alignment DerivePointerAlignment: false
PointerAlignment: Left # (Left,Right,Middle) PointerAlignment: Left
ReferenceAlignment: Pointer # (Pointer,Left,Right,Middle) ReferenceAlignment: Pointer
QualifierAlignment: Right # (Leave,Left,Right,Custom) QualifierAlignment: Right
# --------------------------- # ---------------------------
# include settings and sorting # include settings and sorting
# --------------------------- # ---------------------------
IncludeIsMainSourceRegex: '' # only [*.{c,cc,cpp,c++,cxx,m,mm}] are considered to be "main" IncludeIsMainSourceRegex: ''
IncludeIsMainRegex: '([-_](test|unittest))?$' # regex used for identifying an include as "main", to assign catagory 0 IncludeIsMainRegex: '([-_](test|unittest))?$'
IncludeBlocks: Regroup # (Preserve,Merge,Regroup) IncludeBlocks: Regroup
IncludeCategories: IncludeCategories:
- Regex: '^<.*\.h>' # system headers - Regex: '^<.*\.h>'
Priority: 2 Priority: 2
SortPriority: 0 SortPriority: 0
CaseSensitive: true CaseSensitive: true
- Regex: '^".*' # custom headers - Regex: '^".*'
Priority: 3 Priority: 3
SortPriority: 0 SortPriority: 0
CaseSensitive: true CaseSensitive: true
@@ -132,18 +132,18 @@ WhitespaceSensitiveMacros:
# --------------------------- # ---------------------------
AllowAllArgumentsOnNextLine: false AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false AllowAllParametersOfDeclarationOnNextLine: false
EmptyLineAfterAccessModifier: Never # (Never,Leave,Always) EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock # (Never,Leave,LogicalBlock,Always) EmptyLineBeforeAccessModifier: LogicalBlock
ExperimentalAutoDetectBinPacking: false ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true # adds comments at namespace delimiters FixNamespaceComments: true
MaxEmptyLinesToKeep: 4 # what the maximum amount of empty lines that we're allowed to keep MaxEmptyLinesToKeep: 4
ReflowComments: true # reflow comment text to match column limits ReflowComments: true
RemoveBracesLLVM: false # don't automatically remove braces RemoveBracesLLVM: false
SeparateDefinitionBlocks: Leave # (Leave,Always.Never) SeparateDefinitionBlocks: Leave
ShortNamespaceLines: 1 # how many lines a namespaces can be to be regarded "short" ShortNamespaceLines: 1
SortIncludes: CaseSensitive # (Never,CaseSensitive,CaseInsensitive) SortIncludes: CaseSensitive
SortJavaStaticImport: Before # (After,Before) SortJavaStaticImport: Before
SortUsingDeclarations: LexicographicNumeric # (Never,Lexicographic,LexicographicNumeric) SortUsingDeclarations: LexicographicNumeric
# --------------------------- # ---------------------------
# spacing options # spacing options
@@ -156,7 +156,7 @@ SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements # (ControlStatements,ControlStatementsExceptControlMacros,NonEmptyParentheses,Always,Custom) SpaceBeforeParens: ControlStatements
SpaceBeforeParensOptions: SpaceBeforeParensOptions:
AfterControlStatements: true AfterControlStatements: true
AfterForeachMacros: true AfterForeachMacros: true
@@ -165,7 +165,7 @@ SpaceBeforeParensOptions:
AfterIfMacros: true AfterIfMacros: true
AfterOverloadedOperator: false AfterOverloadedOperator: false
BeforeNonEmptyParentheses: false BeforeNonEmptyParentheses: false
SpaceAroundPointerQualifiers: Default # (Default,Before,After,Both) recommend to use Default and let PointerAlignment decide SpaceAroundPointerQualifiers: Default
SpaceBeforeRangeBasedForLoopColon: true SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: true SpaceInEmptyBlock: true
SpacesInParens: Custom SpacesInParens: Custom
@@ -175,7 +175,7 @@ SpacesInParensOptions:
InCStyleCasts: false InCStyleCasts: false
Other: false Other: false
SpacesBeforeTrailingComments: 1 SpacesBeforeTrailingComments: 1
SpacesInAngles: Never # (Never,Always,Leave) SpacesInAngles: Never
SpacesInConditionalStatement: false SpacesInConditionalStatement: false
SpacesInContainerLiterals: true SpacesInContainerLiterals: true
SpacesInLineCommentPrefix: SpacesInLineCommentPrefix:
@@ -184,7 +184,7 @@ SpacesInLineCommentPrefix:
SpacesInParentheses: false SpacesInParentheses: false
SpacesInSquareBrackets: false SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false SpaceBeforeSquareBrackets: false
BitFieldColonSpacing: Both # (Both,None,Before,After) BitFieldColonSpacing: Both
# --------------------------- # ---------------------------
# indentation details # indentation details
@@ -193,9 +193,9 @@ IndentAccessModifiers: false
IndentCaseLabels: false IndentCaseLabels: false
IndentCaseBlocks: false IndentCaseBlocks: false
IndentGotoLabels: true IndentGotoLabels: true
IndentExternBlock: AfterExternBlock # (AfterExternBlock,NoIndent,Indent) IndentExternBlock: AfterExternBlock
IndentRequiresClause: false IndentRequiresClause: false
IndentPPDirectives: None # preprocessor indent style (None,AfterHash,BeforeHash) IndentPPDirectives: None
PPIndentWidth: 1 PPIndentWidth: 1
--- ---