From c8f0c0316cad50cd18b96fd0975f7f19ebdd22b2 Mon Sep 17 00:00:00 2001 From: Edward O'Callaghan Date: Sat, 3 Jan 2015 01:55:22 +1100 Subject: [PATCH] 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 Reviewed-on: http://review.coreboot.org/8036 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich --- .clang-format | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .clang-format 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