diff options
author | Nikolai Kosjar <nikolai.kosjar@qt.io> | 2017-08-16 08:58:48 +0200 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@qt.io> | 2017-09-04 06:53:55 +0000 |
commit | 54a43de656a490e4bf30005827b2e10adb725502 (patch) | |
tree | a72deca4c9ab7eb7a58c0256ba05be5e0967f188 /.gitignore | |
parent | 40683aaa4e461553289ae79fdae344084c43ca1c (diff) | |
download | qt-creator-54a43de656a490e4bf30005827b2e10adb725502.tar.gz |
Add experimental .clang-format
This adds a configuration file for clang-format [1] and a test file to
demonstrate benefits and current problems with respect to Qt Creator's
coding rules [2].
This is based on clang-format from the llvm/clang 5.0 branch, which is
about to be released soon in the next days/weeks (already behind
schedule).
Using clang-format for Qt Creator brings these advantages:
* Enforce a bunch of coding rules by a simple tool/shortcut invocation.
* Spend less review cycles for authors and reviewers regarding
formatting. This helps especially for/with first-time contributors.
* clang-format sorts includes and using declarations.
* clang-format adds/updates namespace end comments, e.g.: } //
namespace Foo
See dist/clangformat/README.md for setup instructions und currently
known issues.
[1] https://clang.llvm.org/docs/ClangFormat.html
[2] https://doc-snapshots.qt.io/qtcreator-extending/coding-style.html
Task-number: QTCREATORBUG-17643
Change-Id: I87bdd66b8e492e99a360022962b0053f02a33e57
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to '.gitignore')
-rw-r--r-- | .gitignore | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore index 47924d6b97..cdee18b344 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,7 @@ .DS_Store /.qmake.cache /.qmake.stash +/.clang-format Makefile* Thumbs.db core |