Add custom format code

entity-manager has for a long time had autojson.py, which enforces
key ordering to keep the json files consistent.  This commit hooks this
into the custom format-code that CI supports, to be able to reject
patches that haven't run this, and prevent maintainers having to do it
by hand (like 98e102f377d9a5e8f7bbac1063ac39bc5fc8d023)

Tested:
Made some incompatible changes, then ran format-code, and observed them
disappear in the diff as they were cleaned up.  CI on this patch should
also test the CI integration.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: If34ecb3c76b178a5e939db28eb997c76ad628d90
diff --git a/format-code b/format-code
new file mode 100755
index 0000000..2248550
--- /dev/null
+++ b/format-code
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+set -e
+
+# When called from openbmc-build-scripts, the `pwd` could be anywhere, but
+# the root of the repo is passed in the first argument.  Switch to the repo
+# root so npm/git run in the right place.
+if [ -n "$1" ]; then
+    cd "$1"
+fi
+python3 scripts/autojson.py configurations