From 4171db6540d4b8046a308ab14b52870658f27f91 Mon Sep 17 00:00:00 2001 From: Stefano Mazzocchi Date: Wed, 7 Apr 2010 19:05:04 +0000 Subject: [PATCH] adding jslint support git-svn-id: http://google-refine.googlecode.com/svn/trunk@413 7d457c2a-affb-35e4-300a-418c747d4874 --- build.xml | 17 +++++++++++++++++ gridworks | 20 ++++++++++++++++++++ 2 files changed, 37 insertions(+) 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;;