diff --git a/.clang-format b/.clang-format index b8c91976..5eb2af94 100644 --- a/.clang-format +++ b/.clang-format @@ -20,7 +20,7 @@ AlwaysBreakBeforeMultilineStrings: false AlwaysBreakTemplateDeclarations: false BinPackArguments: false BinPackParameters: false -BraceWrapping: +BraceWrapping: AfterClass: false AfterControlStatement: false AfterEnum: false @@ -35,7 +35,7 @@ BraceWrapping: BreakBeforeBinaryOperators: None BreakBeforeBraces: Attach BreakBeforeTernaryOperators: true -BreakConstructorInitializersBeforeComma: false +BreakConstructorInitializers: BeforeComma BreakAfterJavaFieldAnnotations: false BreakStringLiterals: true ColumnLimit: 80 @@ -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)/)' @@ -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 diff --git a/cmake/clang-tools.cmake b/cmake/clang-tools.cmake index 528e9503..92fc0338 100644 --- a/cmake/clang-tools.cmake +++ b/cmake/clang-tools.cmake @@ -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)