diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-01-30 13:57:08 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-01-30 13:57:08 +0100 |
commit | a9ddd636be6d5cd95c6c6b109619a4b1b109901b (patch) | |
tree | 231acfc8522a6c23de55b71028212d508bca664f /formatting.txt | |
parent | 3656a6dc4ad0c166b06cb64293f1a979a684084d (diff) | |
download | sink-a9ddd636be6d5cd95c6c6b109619a4b1b109901b.tar.gz sink-a9ddd636be6d5cd95c6c6b109619a4b1b109901b.zip |
A first clang-format configuration
It's not perfect, especially with regards to single-line lambdas where
the breaks after the curly-brace is lost, but otherwise it's pretty
close already. With clang 3.9 (instead of 3.7) some finer grained
controls will be available that might help.
Also Q_SLOTS is not yet recognized, but slots works fine.
Diffstat (limited to 'formatting.txt')
-rw-r--r-- | formatting.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/formatting.txt b/formatting.txt new file mode 100644 index 0000000..7ad5ab1 --- /dev/null +++ b/formatting.txt | |||
@@ -0,0 +1,7 @@ | |||
1 | Configuration: See .clang-format | ||
2 | |||
3 | # Reformat | ||
4 | clang-format -i common/*.{cpp,h} | ||
5 | |||
6 | # Test | ||
7 | clang-format formattest.cpp > formatted && vimdiff formattest.cpp formatted | ||