Skip to content

Commit

Permalink
STYLE: Cleanup clang-format configuration files
Browse files Browse the repository at this point in the history
Relocate `.clang-format` file into the `cutil` sub-directory
where the use of `extern` statement require setting `BreakBeforeBraces`
to `Custom`.

Remove commented code from main configuration file.
  • Loading branch information
jcfr committed Feb 29, 2024
1 parent e2b0c90 commit 5904dc6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
10 changes: 0 additions & 10 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ IndentPPDirectives: AfterHash
PackConstructorInitializers: Never

# Mozilla-style overides
IndentExternBlock: NoIndent # Requires "BreakBeforeBraces" set to "Custom"
AllowShortFunctionsOnASingleLine: Inline
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
Expand All @@ -29,13 +28,4 @@ BreakBeforeBraces: Mozilla
# function calls.
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH, forever, Q_FOREVER, QBENCHMARK, QBENCHMARK_ONCE ]

# Penalties
# This decides what order things should be done if a line is too long
#PenaltyBreakAssignment: 10
#PenaltyBreakBeforeFirstCallParameter: 30
#PenaltyBreakComment: 10
#PenaltyBreakString: 10
#PenaltyExcessCharacter: 100
#PenaltyReturnTypeOnItsOwnLine: 5

SortIncludes: false
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
BasedOnStyle: InheritParentConfig

IndentExternBlock: NoIndent # Requires "BreakBeforeBraces" set to "Custom"

BreakBeforeBraces: Custom
BraceWrapping:
# Mozilla-style defaults
Expand Down

0 comments on commit 5904dc6

Please sign in to comment.