This task runs JSHint, a tool that helps to detect errors and potential problems in JavaScript code. JSHint 2.5.6+ is supported, although latest JSHint is recommended.
Table C.51: Attributes
Name | Type | Description | Default | Required |
---|---|---|---|---|
file | String | Single file to perform check on. | n/a | No, unless no fileset elements are present |
haltOnError | boolean | Should the build fail when there are errors in the JS code? | false | No |
haltOnWarning | boolean | Should the build fail when there are warnings in the JS code? | false | No |
reporter | String | JSHint reporter. | checkstyle | No |
checkstyleReportPath | String | Path where the the report in Checkstyle format should be saved. | n/a | No |
config | String | JSHint config path. | n/a | No |
<jshint haltonerror="false" haltOnWarning="false" reporter="jslint" checkstyleReportPath="${project.basedir}/build/checkstyle-jshint.xml"> <fileset dir="${project.basedir}/public_html/www/js"> <include name="**/**.js"/> <exclude name="js-cache/**"/> </fileset> </jshint>