Link .clang-format file to system/core one.
Use the .clang-format-2 found in system/core instead of this which is
not actually being used.
Also, enable clang-format running by default.
All upstream directories are marked as ignoring formatting so that
their source files are not modified.
Test: NA
Change-Id: Icee6030f373fa5f072df162f97e6f34320e3d89a
diff --git a/.clang-format b/.clang-format
deleted file mode 100644
index 7630d16..0000000
--- a/.clang-format
+++ /dev/null
@@ -1,15 +0,0 @@
-BasedOnStyle: Google
-AllowShortBlocksOnASingleLine: false
-AllowShortFunctionsOnASingleLine: false
-
-ColumnLimit: 100
-CommentPragmas: NOLINT:.*
-DerivePointerAlignment: false
-IndentWidth: 2
-PointerAlignment: Left
-TabWidth: 2
-UseTab: Never
-PenaltyExcessCharacter: 32
-
-Cpp11BracedListStyle: false
-IncludeBlocks: Preserve
\ No newline at end of file
diff --git a/.clang-format b/.clang-format
new file mode 120000
index 0000000..4cefd65
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1 @@
+../system/core/.clang-format-2
\ No newline at end of file
diff --git a/PREUPLOAD.cfg b/PREUPLOAD.cfg
index 7b533a4..11d9fe6 100644
--- a/PREUPLOAD.cfg
+++ b/PREUPLOAD.cfg
@@ -1,2 +1,8 @@
[Hook Scripts]
notice = tools/update_notice.sh
+
+[Builtin Hooks]
+clang_format = true
+
+[Builtin Hooks Options]
+clang_format = --commit ${PREUPLOAD_COMMIT} --style file --extensions c,h,cc,cpp
diff --git a/libc/kernel/.clang-format b/libc/kernel/.clang-format
new file mode 100644
index 0000000..e384528
--- /dev/null
+++ b/libc/kernel/.clang-format
@@ -0,0 +1 @@
+DisableFormat: true
diff --git a/libc/upstream-freebsd/.clang-format b/libc/upstream-freebsd/.clang-format
new file mode 100644
index 0000000..e384528
--- /dev/null
+++ b/libc/upstream-freebsd/.clang-format
@@ -0,0 +1 @@
+DisableFormat: true
diff --git a/libc/upstream-netbsd/.clang-format b/libc/upstream-netbsd/.clang-format
new file mode 100644
index 0000000..e384528
--- /dev/null
+++ b/libc/upstream-netbsd/.clang-format
@@ -0,0 +1 @@
+DisableFormat: true
diff --git a/libc/upstream-openbsd/.clang-format b/libc/upstream-openbsd/.clang-format
new file mode 100644
index 0000000..e384528
--- /dev/null
+++ b/libc/upstream-openbsd/.clang-format
@@ -0,0 +1 @@
+DisableFormat: true
diff --git a/libm/upstream-freebsd/.clang-format b/libm/upstream-freebsd/.clang-format
new file mode 100644
index 0000000..e384528
--- /dev/null
+++ b/libm/upstream-freebsd/.clang-format
@@ -0,0 +1 @@
+DisableFormat: true
diff --git a/libm/upstream-netbsd/.clang-format b/libm/upstream-netbsd/.clang-format
new file mode 100644
index 0000000..e384528
--- /dev/null
+++ b/libm/upstream-netbsd/.clang-format
@@ -0,0 +1 @@
+DisableFormat: true