Script to run JSLint over JS files to check JS code quality.
authorMario Ferraro <fadinlight@gmail.com>
Tue, 27 Oct 2009 20:04:51 +0000
changeset 3065 c7c5212ba840
parent 3064 bc1eecbd1a7c
child 3066 45e2c3e70761
Script to run JSLint over JS files to check JS code quality. This script will run JSLint over all files in app/soc/content/js directory and subdirectories to check JS code guidelines compliance.
scripts/jslint.sh
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/jslint.sh	Tue Oct 27 20:04:51 2009 +0000
@@ -0,0 +1,17 @@
+#!/bin/bash
+#Requires java installed
+
+echo "JSLINT: running jslint"
+
+JS_DIRECTORY="../app/soc/content/js"
+JSLINT="../thirdparty/jslint/jslint.js"
+RHINO="../thirdparty/shrinksafe/js.jar"
+
+for dir in $(find $JS_DIRECTORY -type d); do
+  for i in $(find $dir/*.js -type f); do
+    echo "JSLINT: Processing $i"
+    java -jar $RHINO $JSLINT $i
+  done
+done
+
+echo "JSLINT: process finished"