Skip to content

Commit

Permalink
Synchronize .clang-format file with main ROOT repo
Browse files Browse the repository at this point in the history
  • Loading branch information
guitargeek committed Mar 18, 2024
1 parent 05abafc commit 2221b6f
Showing 1 changed file with 12 additions and 23 deletions.
35 changes: 12 additions & 23 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# BasedOnStyle: LLVM
AccessModifierOffset: -3
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveAssignments: None
# This would be nice to have but seems to also (mis)align function parameters
AlignConsecutiveDeclarations: false
AlignEscapedNewlinesLeft: true
AlignConsecutiveDeclarations: None
AlignEscapedNewlines: Left
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: true
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: false
Expand All @@ -17,12 +17,12 @@ AllowShortLoopsOnASingleLine: false
# AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterControlStatement: Never
AfterEnum: false
AfterFunction: true
AfterNamespace: false
Expand All @@ -32,7 +32,7 @@ BraceWrapping:
BeforeCatch: false
BeforeElse: false
IndentBraces: false
BreakBeforeBinaryOperators: false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
Expand All @@ -46,19 +46,6 @@ DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
IncludeCategories:
- Regex: '^("|<)T'
Priority: 4
- Regex: '^("|<)ROOT/'
Priority: 5
- Regex: '^<.*\.h>'
Priority: 1
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
- Regex: '^(<|"(gtest|isl|json)/)'
Priority: 3
- Regex: '.*'
Priority: 6
IndentCaseLabels: false
IndentWidth: 3
IndentWrappedFunctionNames: false
Expand All @@ -77,8 +64,8 @@ PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 10
PointerAlignment: Right
ReflowComments: true
SortIncludes: false
ReflowComments: true
SortIncludes: Never
SpaceAfterCStyleCast: false
SpaceBeforeAssignmentOperators: true
# You want this : enable it if you have https://reviews.llvm.org/D32525
Expand All @@ -91,14 +78,16 @@ SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
Standard: c++11
TabWidth: 3
UseTab: Never

# Order alphabetically and by generality the included header files.
IncludeCategories:
- Regex: '^"[^/]+\"'
Priority: 10
- Regex: '^("|<)T'
Priority: 12
- Regex: '^"ROOT/'
Priority: 15
- Regex: '^"cling/'
Expand Down

0 comments on commit 2221b6f

Please sign in to comment.