From a670c57c193c8632bd6d12bdf1afd237b5d753a3 Mon Sep 17 00:00:00 2001 From: Christoph Cullmann Date: Tue, 11 Aug 2020 18:19:35 +0200 Subject: improve default formatting options 1) remove AlignTrailingComments: true => this avoids multiline comment changes if e.g. one longer member/variable is added with comments behind it 2) add AllowShortLambdasOnASingleLine: Empty => avoid the uglification of lambdas --- kde-modules/clang-format.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'kde-modules') diff --git a/kde-modules/clang-format.cmake b/kde-modules/clang-format.cmake index 9e7bbc71..74cc51c9 100644 --- a/kde-modules/clang-format.cmake +++ b/kde-modules/clang-format.cmake @@ -32,9 +32,6 @@ PointerAlignment: Right # horizontally aligns arguments after an open bracket. AlignAfterOpenBracket: Align -# align trailing comments -AlignTrailingComments: true - # don't move all parameters to new line AllowAllParametersOfDeclarationOnNextLine: false @@ -67,3 +64,6 @@ SpaceAfterTemplateKeyword: false # macros for which the opening brace stays attached. ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH, forever, Q_FOREVER, QBENCHMARK, QBENCHMARK_ONCE ] + +# keep lambda formatting multi-line if not empty +AllowShortLambdasOnASingleLine: Empty -- cgit v1.2.1