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 /.clang-format | |
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 '.clang-format')
-rw-r--r-- | .clang-format | 52 |
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 @@ | |||
1 | AccessModifierOffset: -4 | ||
2 | AlignEscapedNewlinesLeft: true | ||
3 | AlignTrailingComments: false | ||
4 | AlignAfterOpenBracket: false | ||
5 | AllowAllParametersOfDeclarationOnNextLine: true | ||
6 | AllowShortBlocksOnASingleLine: false | ||
7 | AllowShortFunctionsOnASingleLine: Inline | ||
8 | AllowShortIfStatementsOnASingleLine: false | ||
9 | AllowShortLoopsOnASingleLine: false | ||
10 | AlwaysBreakAfterDefinitionReturnType: false | ||
11 | AlwaysBreakBeforeMultilineStrings: false | ||
12 | AlwaysBreakTemplateDeclarations: false | ||
13 | BinPackArguments: true | ||
14 | BinPackParameters: true | ||
15 | BreakBeforeBinaryOperators: false | ||
16 | BreakBeforeBraces: Mozilla | ||
17 | BreakBeforeTernaryOperators: false | ||
18 | BreakConstructorInitializersBeforeComma: false | ||
19 | ColumnLimit: 180 | ||
20 | CommentPragmas: '' | ||
21 | ConstructorInitializerAllOnOneLineOrOnePerLine: true | ||
22 | ConstructorInitializerIndentWidth: 4 | ||
23 | ContinuationIndentWidth: 0 | ||
24 | Cpp11BracedListStyle: false | ||
25 | DerivePointerBinding: false | ||
26 | ForEachMacros: ['foreach', 'Q_FOREACH'] | ||
27 | IndentCaseLabels: true | ||
28 | IndentFunctionDeclarationAfterType: false | ||
29 | IndentWidth: 4 | ||
30 | Language: Cpp | ||
31 | MaxEmptyLinesToKeep: 2 | ||
32 | NamespaceIndentation: None | ||
33 | ObjCSpaceAfterProperty: true | ||
34 | ObjCSpaceBeforeProtocolList: true | ||
35 | PenaltyBreakBeforeFirstCallParameter: 100 | ||
36 | PenaltyBreakComment: 100 | ||
37 | PenaltyBreakFirstLessLess: 0 | ||
38 | PenaltyBreakString: 100 | ||
39 | PenaltyExcessCharacter: 1 | ||
40 | PenaltyReturnTypeOnItsOwnLine: 0 | ||
41 | PointerBindsToType: false | ||
42 | SpaceBeforeAssignmentOperators: true | ||
43 | SpaceBeforeParens: ControlStatements | ||
44 | SpaceInEmptyParentheses: false | ||
45 | SpacesBeforeTrailingComments: 1 | ||
46 | SpacesInAngles: false | ||
47 | SpacesInCStyleCastParentheses: false | ||
48 | SpacesInContainerLiterals: false | ||
49 | SpacesInParentheses: false | ||
50 | Standard: Cpp11 | ||
51 | TabWidth: 4 | ||
52 | UseTab: Never | ||