Skip to content

Commit

Permalink
Update clang-format config, exclude vendored files
Browse files Browse the repository at this point in the history
  • Loading branch information
dweindl committed Oct 21, 2024
1 parent df42a89 commit 9a1564e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: false
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterEnum: false
Expand All @@ -35,7 +35,7 @@ BraceWrapping:
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Attach
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeComma
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 80
Expand All @@ -48,7 +48,7 @@ DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
IncludeCategories:
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
- Regex: '^(<|"(gtest|isl|json)/)'
Expand All @@ -75,7 +75,10 @@ PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Right
PointerAlignment: Left
QualifierAlignment: Custom
QualifierOrder: ['inline', 'static', 'type', 'const']
ReferenceAlignment: Left
ReflowComments: true
SortIncludes: true
SpaceAfterCStyleCast: false
Expand Down
2 changes: 1 addition & 1 deletion cmake/clang-tools.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
execute_process(
COMMAND
sh -c
"git ls-tree -r HEAD --name-only | grep -E '(\\.cpp$)|(\\.h$)' | tr '\n' ' '"
"git ls-tree -r HEAD --name-only | grep -E '(\\.cpp$)|(\\.h$)' | grep -v '^deps/' | grep -v '^ThirdParty/' | tr '\n' ' '"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE ALL_CXX_SOURCE_FILES)

Expand Down

0 comments on commit 9a1564e

Please sign in to comment.