aboutsummaryrefslogtreecommitdiffstats
path: root/.clang-format
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-05-22 15:03:40 +0900
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-05-22 11:20:04 -0700
commitc7e7cebed6e40e0828aa36c3ed3f978c15ea8f5e (patch)
tree6c853411aeca86a2f8cc29e710869307eb9b9238 /.clang-format
parentf24f0f3936bff6f61940a543755be03ad6323009 (diff)
downloadsubsurface-c7e7cebed6e40e0828aa36c3ed3f978c15ea8f5e.tar.gz
Small tweaks to our whitespace handling
This is still not (and likely will never be) intended to just be blindly run and mechanically applied to all files. It tries to implement our rules but it is not perfect and more importantly, we have parts of the code where we intentionally break our rules for various reasons of readability in that particular situation. But running this against the sources files you touch often will point out things that are wrong and should be fixed. This fixes the indentation for continuation lines and the handling of the for each style loops (clang 3.5 should have this built in - I'll play with the current development version of this later). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to '.clang-format')
-rw-r--r--.clang-format2
1 files changed, 2 insertions, 0 deletions
diff --git a/.clang-format b/.clang-format
index 6b75350e0..092136768 100644
--- a/.clang-format
+++ b/.clang-format
@@ -10,6 +10,7 @@ ConstructorInitializerAllOnOneLineOrOnePerLine: true
ColumnLimit: 0
IndentFunctionDeclarationAfterType: false #personal taste, good for long methods
IndentWidth: 8
+ContinuationIndentWidth: 8
MaxEmptyLinesToKeep: 2
NamespaceIndentation: All
SpaceBeforeAssignmentOperators: true
@@ -18,3 +19,4 @@ SpacesInParentheses: false
SpacesBeforeTrailingComments: 1
UseTab: Always
PointerBindsToType: false
+# doesn't work, yet -> ForEachMacros: "Q_FOREACH"