ClangFormat: Relax the clang format file a little bit

It will not always insert a line break after 100 sign but tries to find
middle ground. Normally it's not a problem but it will prevent some strange
looking formatting.

Change-Id: I0ba987f944d360b3d0f0d8dce29ef825696b1a92
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Marco Bubke
2020-06-25 14:45:53 +02:00
parent 32e181f5ce
commit 009c2745e2

View File

@@ -1,19 +1,3 @@
# .clang-format for Qt Creator
#
# This is for clang-format >= 5.0.
#
# The configuration below follows the Qt Creator Coding Rules [1] as closely as
# possible. For documentation of the options, see [2].
#
# Use ../../tests/manual/clang-format-for-qtc/test.cpp for documenting problems
# or testing changes.
#
# In case you update this configuration please also update the qtcStyle() in src\plugins\clangformat\clangformatutils.cpp
#
# [1] https://doc-snapshots.qt.io/qtcreator-extending/coding-style.html
# [2] https://clang.llvm.org/docs/ClangFormatStyleOptions.html
#
---
Language: Cpp Language: Cpp
AccessModifierOffset: -4 AccessModifierOffset: -4
AlignAfterOpenBracket: Align AlignAfterOpenBracket: Align
@@ -90,12 +74,12 @@ NamespaceIndentation: None
ObjCBlockIndentWidth: 4 ObjCBlockIndentWidth: 4
ObjCSpaceAfterProperty: false ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 150 PenaltyBreakAssignment: 500
PenaltyBreakBeforeFirstCallParameter: 300 PenaltyBreakBeforeFirstCallParameter: 150
PenaltyBreakComment: 500 PenaltyBreakComment: 500
PenaltyBreakFirstLessLess: 400 PenaltyBreakFirstLessLess: 400
PenaltyBreakString: 600 PenaltyBreakString: 600
PenaltyExcessCharacter: 50 PenaltyExcessCharacter: 7
PenaltyReturnTypeOnItsOwnLine: 300 PenaltyReturnTypeOnItsOwnLine: 300
PointerAlignment: Right PointerAlignment: Right
ReflowComments: false ReflowComments: false