Skip to content

Commit

Permalink
Merge #2806: [Tools] Sanitize existing clang-format rules
Browse files Browse the repository at this point in the history
472a423 Sanitize existing clang-format rules (Fuzzbawls)

Pull request description:

  Removes un-necessary extra whitespace, set explicit values instead of implied values for some rules, and update the standard to c++14.

  Updated the following rules to their new names:
  - `AlignEscapedNewlinesLeft` -> `AlignEscapedNewlines`
  - `IndentFunctionDeclarationAfterType` -> `IndentWrappedFunctionNames`

  Removed the following rules as they are un-necessary:
  - `Penalty*`: since we don't enforce a line length
  - `TabWidth`: since we don't use tabs

ACKs for top commit:
  Liquid369:
    tACK 472a423
  panleone:
    utACK 472a423

Tree-SHA512: 539dd87c6c0965828132ad8110a151aa4679db8fdc6adc93f606239ad903b22606934e790a9689dfad568dffc15cbd17d260ad7d07c43dc4d59d1a94832b1982
  • Loading branch information
Fuzzbawls committed Mar 13, 2023
2 parents 6f2d9be + 472a423 commit e4634a5
Showing 1 changed file with 15 additions and 22 deletions.
37 changes: 15 additions & 22 deletions src/.clang-format
Original file line number Diff line number Diff line change
@@ -1,51 +1,44 @@
Language: Cpp
Language: Cpp
AccessModifierOffset: -4
AlignAfterOpenBracket: false
AlignEscapedNewlinesLeft: true
AlignAfterOpenBracket: DontAlign
AlignEscapedNewlines: Left
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortBlocksOnASingleLine: Always
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: true
AllowShortIfStatementsOnASingleLine: Always
AllowShortLoopsOnASingleLine: false
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
AlwaysBreakTemplateDeclarations: Yes
BinPackParameters: false
BreakBeforeBinaryOperators: false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Linux
BreakBeforeTernaryOperators: false
BreakConstructorInitializersBeforeComma: false
ColumnLimit: 0
CommentPragmas: '^ IWYU pragma:'
ColumnLimit: 0
CommentPragmas: '^ IWYU pragma:'
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
DisableFormat: false
IndentCaseLabels: false
IndentFunctionDeclarationAfterType: false
IndentWidth: 4
IndentWidth: 4
IndentWrappedFunctionNames: False
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 2
NamespaceIndentation: None
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: false
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Left
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
Standard: Cpp03
TabWidth: 8
UseTab: Never
Standard: c++14
UseTab: Never

0 comments on commit e4634a5

Please sign in to comment.