diff options
author | Rémi Nicole <nicole@kolabsystems.com> | 2018-02-26 10:56:26 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-02-26 10:56:38 +0100 |
commit | 0b27ee6df7588a1a1a7c86a888498ffa50b0e115 (patch) | |
tree | 345af8540399d8585d86c7a0d02a8d4f4b9f4ad7 /.clang-format | |
parent | 236fb1cb3a1d1638c52cf53fec341e64e7123091 (diff) | |
download | kube-0b27ee6df7588a1a1a7c86a888498ffa50b0e115.tar.gz kube-0b27ee6df7588a1a1a7c86a888498ffa50b0e115.zip |
Add some configuration files for code style tooling
Summary:
Tools:
- [EditorConfig](http://editorconfig.org/)
- [Clang Format](https://clang.llvm.org/docs/ClangFormat.html)
Code style:
- ClangFormat taken from Sink's configuration with small modifications:
- max width set to 100 characters
- do not pack arguments and initializer list elements
- no space inside brace lists
- EditorConfig: UNIX style text files, 4 spaces for indentation
Reviewers: cmollekopf
Reviewed By: cmollekopf
Tags: #kube
Differential Revision: https://phabricator.kde.org/D10740
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 00000000..c20132d8 --- /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: Empty | ||
8 | AllowShortIfStatementsOnASingleLine: false | ||
9 | AllowShortLoopsOnASingleLine: false | ||
10 | AlwaysBreakAfterDefinitionReturnType: false | ||
11 | AlwaysBreakBeforeMultilineStrings: false | ||
12 | AlwaysBreakTemplateDeclarations: true | ||
13 | BinPackArguments: false | ||
14 | BinPackParameters: true | ||
15 | BreakBeforeBinaryOperators: false | ||
16 | BreakBeforeBraces: Mozilla | ||
17 | BreakBeforeTernaryOperators: false | ||
18 | BreakConstructorInitializersBeforeComma: false | ||
19 | ColumnLimit: 100 | ||
20 | CommentPragmas: '' | ||
21 | ConstructorInitializerAllOnOneLineOrOnePerLine: true | ||
22 | ConstructorInitializerIndentWidth: 4 | ||
23 | ContinuationIndentWidth: 4 | ||
24 | Cpp11BracedListStyle: true | ||
25 | DerivePointerBinding: false | ||
26 | ForEachMacros: ['foreach', 'Q_FOREACH', 'QBENCHMARK'] | ||
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 | ||