Skip to content

Commit

Permalink
update(clang-format): update clang format options
Browse files Browse the repository at this point in the history
After updating the used clang versions from 14 to 18, it was necessary
to update the available options in .clang-format that that into account
new options introduced and others deprecated in versions 15 through 18.

Signed-off-by: Jose Martins <[email protected]>
  • Loading branch information
josecm committed Oct 12, 2023
1 parent 4188c70 commit eab4781
Showing 1 changed file with 25 additions and 14 deletions.
39 changes: 25 additions & 14 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ AlignConsecutiveBitFields: None
AlignConsecutiveDeclarations: None
AlignEscapedNewlines: Left
AlignOperands: DontAlign
AlignTrailingComments: true
AlignTrailingComments: false
AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortEnumsOnASingleLine: true
AllowShortBlocksOnASingleLine: Always
Expand Down Expand Up @@ -39,38 +38,49 @@ BraceWrapping:
SplitEmptyRecord: false
BreakBeforeBinaryOperators: None
BreakBeforeTernaryOperators: false
BreakBeforeInlineASMColon: OnlyMultiline
BreakStringLiterals: true
ColumnLimit: 80
ContinuationIndentWidth: 4
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Preserve
IndentCaseBlocks: false
IndentCaseLabels: true
IndentGotoLabels: false
IndentPPDirectives: None
IndentPPDirectives: BeforeHash
IndentWidth: 4
IndentWrappedFunctionNames: false
InsertBraces: true
InsertNewlineAtEOF: true
InsertTrailingCommas: None
KeepEmptyLinesAtEOF: false
KeepEmptyLinesAtTheStartOfBlocks: false
LineEnding: LF
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 1000
PenaltyBreakComment: 10
PenaltyBreakFirstLessLess: 10
PenaltyBreakOpenParenthesis: 5
PenaltyBreakString: 10
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 100
PenaltyExcessCharacter: 50
PenaltyReturnTypeOnItsOwnLine: 100
PointerAlignment: Left
# Not using QualigierAlignment as it seems only to affect parameter lists, not
# variable declarations. May enable it if this changes in future clang-format
# versions.
# QualifierAlignment: Custom
# QualifierOrder: ['static', 'inline', 'type', 'const', 'volatile']
ReflowComments: true
RemoveBracesLLVM: false
RemoveParentheses: MultipleParentheses
RemoveSemicolon: true
SeparateDefinitionBlocks: Leave
SortIncludes: false
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
Expand All @@ -80,19 +90,20 @@ SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: false
SpaceInEmptyBlock: true
SpaceInEmptyParentheses: false
SpacesInParens: Custom
SpacesInParensOptions:
InConditionalStatements: false
InEmptyParentheses: false
InCStyleCasts: false
Other: false
SpacesBeforeTrailingComments: 1
SpacesInConditionalStatement: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
Standard: Latest
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 4
UseCRLF: false
UseTab: Never
WhitespaceSensitiveMacros:
- STRINGIZE
Expand Down

0 comments on commit eab4781

Please sign in to comment.