diff options
author | Eike Ziller <eike.ziller@qt.io> | 2020-10-29 08:18:37 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2020-11-02 08:10:46 +0000 |
commit | 8e69decd694e837777d6fb5e7132bd8a98c6df1d (patch) | |
tree | 3649576735071f053370e5d28b50228cb7c7cea5 /.clang-format | |
parent | 4e28aed405d124ca3ab70442231933e81cda54e7 (diff) | |
download | qt-creator-8e69decd694e837777d6fb5e7132bd8a98c6df1d.tar.gz |
Revert "ClangFormat: Relax the clang format file a little bit"
That change does an experiment on the clang format file without
discussing the results before. It wasn't tested and discussed on a
larger code base, and ignores tests/manual/clang-format-for-qtc.
Individual ("pre-discussion") experiments with the clang-format file
should be done in a separate experimental version instead (e.g.
somewhere in dist/).
This reverts commit 009c2745e27a9b1e9bc3886f159c271fb491c7d4.
Change-Id: I5f9fa50d2ccc63807218ae5d193a3a0718956576
Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to '.clang-format')
-rw-r--r-- | .clang-format | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/.clang-format b/.clang-format index e1dad0fa0c..97f7f2b234 100644 --- a/.clang-format +++ b/.clang-format @@ -1,3 +1,19 @@ +# .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 AccessModifierOffset: -4 AlignAfterOpenBracket: Align @@ -74,12 +90,12 @@ NamespaceIndentation: None ObjCBlockIndentWidth: 4 ObjCSpaceAfterProperty: false ObjCSpaceBeforeProtocolList: true -PenaltyBreakAssignment: 500 -PenaltyBreakBeforeFirstCallParameter: 150 +PenaltyBreakAssignment: 150 +PenaltyBreakBeforeFirstCallParameter: 300 PenaltyBreakComment: 500 PenaltyBreakFirstLessLess: 400 PenaltyBreakString: 600 -PenaltyExcessCharacter: 7 +PenaltyExcessCharacter: 50 PenaltyReturnTypeOnItsOwnLine: 300 PointerAlignment: Right ReflowComments: false |