aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2020-06-14 23:18:44 -0700
committerEric Biggers <ebiggers@google.com>2020-06-14 23:18:44 -0700
commit26168251e2cbf02dfcc722837ca5194ec3792d3c (patch)
treece3837154718848511852f3e3f408f516db4473a
parentf81f77709a91164d169eff7434021c0ed40743ae (diff)
downloadfsverity-utils-26168251e2cbf02dfcc722837ca5194ec3792d3c.tar.gz
Add a clang-format file
Use settings that approximate the existing code, which tries to follow Linux kernel style. It isn't enforced, but this could be useful for contributors using 'git clang-format'. Signed-off-by: Eric Biggers <ebiggers@google.com>
-rw-r--r--.clang-format13
1 files changed, 13 insertions, 0 deletions
diff --git a/.clang-format b/.clang-format
new file mode 100644
index 0000000..2a21ac5
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,13 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright 2020 Google LLC
+#
+# Formatting settings to approximate the Linux kernel coding style.
+BasedOnStyle: LLVM
+AllowShortFunctionsOnASingleLine: false
+AllowShortIfStatementsOnASingleLine: false
+BreakBeforeBraces: Linux
+Cpp11BracedListStyle: false
+IncludeBlocks: Preserve
+IndentCaseLabels: false
+IndentWidth: 8
+UseTab: Always