summaryrefslogtreecommitdiff
path: root/format-code.sh
diff options
context:
space:
mode:
authorDerick Montague <derick.montague@ibm.com>2020-05-29 19:21:36 +0300
committerDerick Montague <derick.montague@ibm.com>2020-05-29 23:05:49 +0300
commitbf2131f8a55459f2d9c980856107f0a96009a05a (patch)
treecb4c9025cedd7cc100ddc53c1e432b27c3592442 /format-code.sh
parent396aaab761da86698dcb5890b0a6960a90d3459b (diff)
downloadwebui-vue-bf2131f8a55459f2d9c980856107f0a96009a05a.tar.xz
Add continuous integration code linting script
This is a short-term solution for testing code formatting during continuous integration. It relies on the npm ci function to install package dependencies and run the vue-cli-service lint command. Signed-off-by: Derick Montague <derick.montague@ibm.com> Change-Id: I4a6c3f304ad4caa409c4f463dc1a098a96b7467f
Diffstat (limited to 'format-code.sh')
-rwxr-xr-xformat-code.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/format-code.sh b/format-code.sh
new file mode 100755
index 00000000..b490dd2a
--- /dev/null
+++ b/format-code.sh
@@ -0,0 +1,11 @@
+# Run GUI Linting and Formatting as part of the CI Build process
+#
+# This is a short term solution. The long term solution to will be to
+# add much of this to the build script.
+#
+
+set -e
+
+npm ci
+npm run lint
+git --no-pager diff --exit-code \ No newline at end of file