top: add .clang-format
authorOlof Johansson <olof@lixom.net>
Thu, 11 Apr 2019 00:41:37 +0000 (17:41 -0700)
committerAnup Patel <anup@brainfault.org>
Wed, 24 Apr 2019 04:19:46 +0000 (09:49 +0530)
Add a clang-format to automate consistent code formatting.

Automating coding style reformatting removes a lot of manual
checkpatch-type fixups, and can easily be implemented as a linter in
code review environments.

Signed-off-by: Olof Johansson <olof@lixom.net>
.clang-format [new file with mode: 0644]

diff --git a/.clang-format b/.clang-format
new file mode 100644 (file)
index 0000000..c80c0aa
--- /dev/null
@@ -0,0 +1,16 @@
+AlignConsecutiveAssignments: true
+AlignEscapedNewlines: Left
+AlignTrailingComments: true
+AllowShortFunctionsOnASingleLine: None
+BraceWrapping:
+  AfterFunction: true
+BreakBeforeBraces: Custom
+BreakStringLiterals: false
+ContinuationIndentWidth: 8
+Cpp11BracedListStyle: false
+IndentWidth: 8
+ReflowComments: false
+SortIncludes: false
+SpacesInContainerLiterals: false
+TabWidth: 8
+UseTab: Always