diff --git a/build.xml b/build.xml index 64afda1d7..9b136ff7e 100644 --- a/build.xml +++ b/build.xml @@ -293,6 +293,23 @@ + + + + + + + + + + + + + diff --git a/gridworks b/gridworks index 3a343bf69..d031438af 100755 --- a/gridworks +++ b/gridworks @@ -62,6 +62,7 @@ and is one of findbugs .................. Run Findbugs against Gridworks pmd ....................... Run PMD against Gridworks cpd ....................... Run Copy/Paste Detection against Gridworks + jslint .................... Run JSlint against Gridworks mac_dist ........ Make MacOSX binary distribution windows_dist .... Make Windows binary distribution @@ -307,6 +308,17 @@ pmd_prepare() { tool_download $PMD_URL $PMD_FILE $PMD_DIR } + +jslint_prepare() { + tools_prepare + + JSLINT_URL="http://jslint4java.googlecode.com/files/jslint4java-1.3.3-dist.zip" + JSLINT_FILE="jslint4java-1.3.3-dist.zip" + JSLINT_DIR="jslint4java-1.3.3" + + tool_download $JSLINT_URL $JSLINT_FILE $JSLINT_DIR +} + # ---------------------------------------------------------------------------------------------- @@ -566,6 +578,13 @@ cpd() { ant cpd } +jslint() { + jslint_prepare + + ANT_PARAMS="-Djslint.dir=${GRIDWORKS_TOOLS_DIR}/${JSLINT_DIR}" + ant jslint +} + # -------------------------- script ----------------------------- # ----- Normalize the current directory ------------------------- @@ -688,6 +707,7 @@ case "$ACTION" in findbugs) findbugs;; pmd) pmd;; cpd) cpd;; + jslint) jslint;; run) run;; execute) execute $*;; mac_dist) mac_dist $1;;