summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2015-01-22 14:17:46 +0100
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2015-01-22 14:17:46 +0100
commitdc89f4d749de475f6b28c0fbe607aef6fe3162ec (patch)
tree88b12b2a128abea5b8307a9e3b93ce35f986fd3c
parent29cf62d20133b32e1514a315b4f7e013ed9cb768 (diff)
downloadmpv-clang-format.tar.bz2
mpv-clang-format.tar.xz
basic formatting [tmp]clang-format
-rw-r--r--.clang-format8
-rwxr-xr-xTOOLS/check-format.sh3
2 files changed, 11 insertions, 0 deletions
diff --git a/.clang-format b/.clang-format
new file mode 100644
index 0000000000..91dc6585ea
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,8 @@
+# vi: ft=yaml
+
+BasedOnStyle: LLVM
+IndentWidth: 4
+UseTab: false
+BreakBeforeBraces: Stroustrup # Linux would break event after `struct name {`
+AllowShortIfStatementsOnASingleLine: false
+IndentCaseLabels: false
diff --git a/TOOLS/check-format.sh b/TOOLS/check-format.sh
new file mode 100755
index 0000000000..eb5ecb2932
--- /dev/null
+++ b/TOOLS/check-format.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+clang-format $1 | diff $1 - | colordiff