JSLintAntTask

到http://code.google.com/p/jslint4java/downloads/list下载jslint4java-1.2.1.zip;
解包后将jslint4java-1.2.1+rhino.jar添加到你的工程路径下;

build.xml配置:

<taskdef name="jslint"
             classname="net.happygiraffe.jslint.ant.JSLintTask"
             classpath="/root/workspace/C2_REPORT/lib/jslint4java-1.2.1+rhino.jar" />

<target name="jslint">
   <jslint>
  <formatter type="plain" />
  <fileset dir="web/js" includes="*.js" />
   </jslint>

</target>

你可能感兴趣的:(xml,Google)