From d41936ecbf983f77e295b36d4ac3fed279243de1 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sun, 3 Jun 2018 12:42:06 +0200 Subject: [PATCH] Update clangformat make target and config Signed-off-by: Clifford Wolf --- .clang-format | 21 ++++++++++----------- CMakeLists.txt | 2 +- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/.clang-format b/.clang-format index 3a5940ef..d825df6f 100644 --- a/.clang-format +++ b/.clang-format @@ -21,26 +21,26 @@ AlwaysBreakTemplateDeclarations: false BinPackArguments: true BinPackParameters: true BraceWrapping: - AfterClass: false + AfterClass: true AfterControlStatement: false - AfterEnum: false - AfterFunction: false + AfterEnum: true + AfterFunction: true AfterNamespace: false AfterObjCDeclaration: false - AfterStruct: false - AfterUnion: false + AfterStruct: true + AfterUnion: true BeforeCatch: false BeforeElse: false IndentBraces: false BreakBeforeBinaryOperators: None -BreakBeforeBraces: Attach +BreakBeforeBraces: Custom BreakBeforeTernaryOperators: true BreakConstructorInitializersBeforeComma: false ColumnLimit: 80 CommentPragmas: '^ IWYU pragma:' ConstructorInitializerAllOnOneLineOrOnePerLine: false -ConstructorInitializerIndentWidth: 4 -ContinuationIndentWidth: 4 +ConstructorInitializerIndentWidth: 8 +ContinuationIndentWidth: 8 Cpp11BracedListStyle: true DerivePointerAlignment: false DisableFormat: false @@ -54,14 +54,14 @@ IncludeCategories: - Regex: '.*' Priority: 1 IndentCaseLabels: false -IndentWidth: 2 +IndentWidth: 4 IndentWrappedFunctionNames: false KeepEmptyLinesAtTheStartOfBlocks: true MacroBlockBegin: '' MacroBlockEnd: '' MaxEmptyLinesToKeep: 1 NamespaceIndentation: None -ObjCBlockIndentWidth: 2 +ObjCBlockIndentWidth: 4 ObjCSpaceAfterProperty: false ObjCSpaceBeforeProtocolList: true PenaltyBreakBeforeFirstCallParameter: 19 @@ -87,4 +87,3 @@ Standard: Cpp11 TabWidth: 8 UseTab: Never ... - diff --git a/CMakeLists.txt b/CMakeLists.txt index 02919994..cd559203 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,7 +68,7 @@ foreach (family ${FAMILIES}) endforeach (family) file(GLOB_RECURSE CLANGFORMAT_FILES *.cc *.h) -string(REGEX REPLACE "[^;]*/ice40/chipdbs/chipdb-[^ ]*.cc" "" CLANGFORMAT_FILES "${CLANGFORMAT_FILES}") +string(REGEX REPLACE "[^;]*/ice40/chipdbs/chipdb-[^;]*.cc" "" CLANGFORMAT_FILES "${CLANGFORMAT_FILES}") add_custom_target( clangformat