summaryrefslogtreecommitdiffstats
path: root/.clang-format
diff options
context:
space:
mode:
authorRémi Nicole <nicole@kolabsystems.com>2018-02-26 10:56:26 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-02-26 10:56:38 +0100
commit0b27ee6df7588a1a1a7c86a888498ffa50b0e115 (patch)
tree345af8540399d8585d86c7a0d02a8d4f4b9f4ad7 /.clang-format
parent236fb1cb3a1d1638c52cf53fec341e64e7123091 (diff)
downloadkube-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-format52
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 @@
1AccessModifierOffset: -4
2AlignEscapedNewlinesLeft: true
3AlignTrailingComments: false
4AlignAfterOpenBracket: false
5AllowAllParametersOfDeclarationOnNextLine: true
6AllowShortBlocksOnASingleLine: false
7AllowShortFunctionsOnASingleLine: Empty
8AllowShortIfStatementsOnASingleLine: false
9AllowShortLoopsOnASingleLine: false
10AlwaysBreakAfterDefinitionReturnType: false
11AlwaysBreakBeforeMultilineStrings: false
12AlwaysBreakTemplateDeclarations: true
13BinPackArguments: false
14BinPackParameters: true
15BreakBeforeBinaryOperators: false
16BreakBeforeBraces: Mozilla
17BreakBeforeTernaryOperators: false
18BreakConstructorInitializersBeforeComma: false
19ColumnLimit: 100
20CommentPragmas: ''
21ConstructorInitializerAllOnOneLineOrOnePerLine: true
22ConstructorInitializerIndentWidth: 4
23ContinuationIndentWidth: 4
24Cpp11BracedListStyle: true
25DerivePointerBinding: false
26ForEachMacros: ['foreach', 'Q_FOREACH', 'QBENCHMARK']
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