Add format-code.sh to run special clang verify

The phosphor-webui repo requires only certain directories
be verified with clang-format. This script utilizes the
override capabilities of the format-code.sh CI process
to handle this.

Change-Id: Icb759a7d94d2b007fa88261dacc39913b1076a0a
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/format-code.sh b/format-code.sh
new file mode 100755
index 0000000..0a6362c
--- /dev/null
+++ b/format-code.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+# This script reformats source files using the clang-format utility.
+#
+# Files are changed in-place, so make sure you don't have anything open in an
+# editor, and you may want to commit before formatting in case of awryness.
+#
+# This must be run on a clean repository to succeed
+
+DIR=$(pwd)
+cd ${DIR}
+
+set -e
+
+echo "Formatting code under $DIR/"
+
+# Only validate certain areas of the code base for
+# formatting due to some imported code in webui
+
+if [ -f ".clang-format" ]; then
+    clang-format-5.0 -i `git ls-files '*.js'`
+    git --no-pager diff --exit-code
+fi