summaryrefslogtreecommitdiffstats
path: root/.clang-format
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-01-30 13:57:08 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-01-30 13:57:08 +0100
commita9ddd636be6d5cd95c6c6b109619a4b1b109901b (patch)
tree231acfc8522a6c23de55b71028212d508bca664f /.clang-format
parent3656a6dc4ad0c166b06cb64293f1a979a684084d (diff)
downloadsink-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 '.clang-format')
-rw-r--r--.clang-format52
1 files changed, 52 insertions, 0 deletions
diff --git a/.clang-format b/.clang-format
new file mode 100644
index 0000000..1822f86
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,52 @@
1AccessModifierOffset: -4
2AlignEscapedNewlinesLeft: true
3AlignTrailingComments: false
4AlignAfterOpenBracket: false
5AllowAllParametersOfDeclarationOnNextLine: true
6AllowShortBlocksOnASingleLine: false
7AllowShortFunctionsOnASingleLine: Inline
8AllowShortIfStatementsOnASingleLine: false
9AllowShortLoopsOnASingleLine: false
10AlwaysBreakAfterDefinitionReturnType: false
11AlwaysBreakBeforeMultilineStrings: false
12AlwaysBreakTemplateDeclarations: false
13BinPackArguments: true
14BinPackParameters: true
15BreakBeforeBinaryOperators: false
16BreakBeforeBraces: Mozilla
17BreakBeforeTernaryOperators: false
18BreakConstructorInitializersBeforeComma: false
19ColumnLimit: 180
20CommentPragmas: ''
21ConstructorInitializerAllOnOneLineOrOnePerLine: true
22ConstructorInitializerIndentWidth: 4
23ContinuationIndentWidth: 0
24Cpp11BracedListStyle: false
25DerivePointerBinding: false
26ForEachMacros: ['foreach', 'Q_FOREACH']
27IndentCaseLabels: true
28IndentFunctionDeclarationAfterType: false
29IndentWidth: 4
30Language: Cpp
31MaxEmptyLinesToKeep: 2
32NamespaceIndentation: None
33ObjCSpaceAfterProperty: true
34ObjCSpaceBeforeProtocolList: true
35PenaltyBreakBeforeFirstCallParameter: 100
36PenaltyBreakComment: 100
37PenaltyBreakFirstLessLess: 0
38PenaltyBreakString: 100
39PenaltyExcessCharacter: 1
40PenaltyReturnTypeOnItsOwnLine: 0
41PointerBindsToType: false
42SpaceBeforeAssignmentOperators: true
43SpaceBeforeParens: ControlStatements
44SpaceInEmptyParentheses: false
45SpacesBeforeTrailingComments: 1
46SpacesInAngles: false
47SpacesInCStyleCastParentheses: false
48SpacesInContainerLiterals: false
49SpacesInParentheses: false
50Standard: Cpp11
51TabWidth: 4
52UseTab: Never