summaryrefslogtreecommitdiff
path: root/.clang-format
diff options
context:
space:
mode:
authorEdward O'Callaghan <eocallaghan@alterapraxis.com>2015-01-03 01:55:22 +1100
committerStefan Reinauer <stefan.reinauer@coreboot.org>2015-11-10 00:49:03 +0100
commitc8f0c0316cad50cd18b96fd0975f7f19ebdd22b2 (patch)
treef22bb88af0e9e88a4f7fc92b71cbe63befd30fac /.clang-format
parent59597ead1f26d4c18997bda81b2ec33e52973b80 (diff)
downloadcoreboot-c8f0c0316cad50cd18b96fd0975f7f19ebdd22b2.tar.xz
Provide coreboot coding style formalisation file for clang-format
The Clang project has a powerful code rewrite engine in the form of LibFormat. A auxiliary tool is provided called `clang-format' that can take a coding style formalisation file and rewrite your code to conform to this style. Further, a wrapper script called `git-clang-format' is also provided that can hook pre-commits potentially replacing our slow and poor coverage regexp scripts on pre-commits. Herein we provide essentially the Linux Style Guide formalism. Change-Id: Ica2207fdb8a4702793fa73eba6293b7b36ea9050 Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-on: http://review.coreboot.org/8036 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to '.clang-format')
-rw-r--r--.clang-format6
1 files changed, 6 insertions, 0 deletions
diff --git a/.clang-format b/.clang-format
new file mode 100644
index 0000000000..a3ef233a24
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,6 @@
+BasedOnStyle: LLVM
+IndentWidth: 8
+UseTab: Always
+BreakBeforeBraces: Linux
+AllowShortIfStatementsOnASingleLine: false
+IndentCaseLabels: false