From 8b0e50ae0077736efd3e84bb7ab089c4133bdeaa Mon Sep 17 00:00:00 2001
From: Stephane Del Pino <stephane.delpino44@gmail.com>
Date: Mon, 21 Jan 2019 23:07:52 +0100
Subject: [PATCH] Add clang-format

- format is based on LLVM format with a bunch of customizations
- clang-format is deactivated in the `packages` directory
---
 .clang-format          | 37 +++++++++++++++++++++++++++++++++++++
 packages/.clang-format |  6 ++++++
 2 files changed, 43 insertions(+)
 create mode 100644 .clang-format
 create mode 100644 packages/.clang-format

diff --git a/.clang-format b/.clang-format
new file mode 100644
index 000000000..0109e4f87
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,37 @@
+---
+BasedOnStyle: LLVM
+AccessModifierOffset: '-1'
+AlignConsecutiveAssignments: 'false'
+AlignEscapedNewlines: Left
+AlignOperands: 'true'
+AlignTrailingComments: 'true'
+AllowAllParametersOfDeclarationOnNextLine: 'false'
+AllowShortIfStatementsOnASingleLine: 'false'
+AllowShortLoopsOnASingleLine: 'true'
+AlwaysBreakAfterDefinitionReturnType: All
+AlwaysBreakAfterReturnType: All
+AlwaysBreakTemplateDeclarations: 'Yes'
+BinPackArguments: 'false'
+BinPackParameters: 'false'
+BreakBeforeBinaryOperators: None
+BreakBeforeBraces: Mozilla
+ColumnLimit: '100'
+ConstructorInitializerAllOnOneLineOrOnePerLine: 'true'
+Cpp11BracedListStyle: 'true'
+FixNamespaceComments: 'true'
+IndentWidth: '2'
+PointerAlignment: Left
+ReflowComments: 'true'
+SortIncludes: 'true'
+SortUsingDeclarations: 'true'
+SpaceAfterTemplateKeyword: 'true'
+SpaceBeforeAssignmentOperators: 'true'
+SpaceBeforeCpp11BracedList: 'false'
+SpaceBeforeInheritanceColon: 'true'
+SpaceBeforeParens: ControlStatements
+SpaceBeforeRangeBasedForLoopColon: 'true'
+SpacesInParentheses: 'false'
+SpacesInSquareBrackets: 'false'
+Standard: Auto
+
+...
diff --git a/packages/.clang-format b/packages/.clang-format
new file mode 100644
index 000000000..7b69119bb
--- /dev/null
+++ b/packages/.clang-format
@@ -0,0 +1,6 @@
+---
+Language: Cpp
+DisableFormat: true
+SortIncludes: false
+---
+
-- 
GitLab