aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Alexey Sokolov2016-04-23 23:24:01 +0100
committerGravatar Alexey Sokolov2016-04-29 23:48:35 +0100
commitfa118b93194cf409b97dd0b0a8ca0a9e5a038335 (patch)
tree6c436f6b0da8ef305a982791c3aff019379d2004
parentProtect several hand-crafted blocks from clang-format (diff)
downloadKVIrc-fa118b93194cf409b97dd0b0a8ca0a9e5a038335.tar.gz
KVIrc-fa118b93194cf409b97dd0b0a8ca0a9e5a038335.tar.bz2
KVIrc-fa118b93194cf409b97dd0b0a8ca0a9e5a038335.zip
Add config for clang-format.
I tried to make the difference from the current style to be minimal. Most of differences are: * New line around "else" * Space between function arguments * Aligned declarations and assignments are disabled for now. See https://llvm.org/bugs/show_bug.cgi?id=27496 https://llvm.org/bugs/show_bug.cgi?id=27497
-rw-r--r--.clang-format17
1 files changed, 17 insertions, 0 deletions
diff --git a/.clang-format b/.clang-format
new file mode 100644
index 000000000..9f8463ad0
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,17 @@
+---
+BasedOnStyle: WebKit
+Standard: Cpp11
+
+UseTab: ForIndentation
+IndentWidth: 4
+TabWidth: 4
+NamespaceIndentation: All
+IndentCaseLabels: true
+SpaceBeforeParens: Never
+BreakBeforeBraces: Allman
+BreakConstructorInitializersBeforeComma: false
+
+AlignTrailingComments: true
+DerivePointerAlignment: false
+PointerAlignment: Middle
+...