From ff2e5fa6cc61158418016d0e60e8c1fa55f863fe Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 19 Dec 2018 09:33:19 +0100 Subject: [PATCH] Add clang-format typesetting hints This approximates our current code style as well as possible. For the actual code style guidelines, see github.com/Ultimaker/Meta. Fixes #871. --- clang-format | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 clang-format diff --git a/clang-format b/clang-format new file mode 100644 index 0000000000..e3c247c51d --- /dev/null +++ b/clang-format @@ -0,0 +1,35 @@ +--- +AllowAllParametersOfDeclarationOnNextLine: 'true' +AllowShortBlocksOnASingleLine: 'true' +AllowShortFunctionsOnASingleLine: None +AllowShortIfStatementsOnASingleLine: 'false' +AllowShortLoopsOnASingleLine: 'false' +AlwaysBreakTemplateDeclarations: 'true' +BreakBeforeBinaryOperators: 'true' +BreakBeforeBraces: Allman +BreakConstructorInitializersBeforeComma: 'true' +ConstructorInitializerAllOnOneLineOrOnePerLine: 'true' +Cpp11BracedListStyle: 'false' +DerivePointerAlignment: 'false' +IndentCaseLabels: 'true' +IndentWidth: '4' +KeepEmptyLinesAtTheStartOfBlocks: 'false' +Language: Cpp +MaxEmptyLinesToKeep: '2' +NamespaceIndentation: None +ObjCSpaceAfterProperty: 'true' +ObjCSpaceBeforeProtocolList: 'false' +PointerAlignment: Left +SpaceBeforeAssignmentOperators: 'true' +SpaceBeforeParens: ControlStatements +SpaceInEmptyParentheses: 'false' +SpacesBeforeTrailingComments: '1' +SpacesInAngles: 'false' +SpacesInCStyleCastParentheses: 'false' +SpacesInContainerLiterals: 'true' +SpacesInParentheses: 'false' +Standard: Cpp11 +TabWidth: '5' +UseTab: Never + +...