C.31 JsHintTask
Prev | Appendix C. Optional tasks | Next

## C.31 JsHintTask

This task runs JSHint, a tool that helps to detect errors and potential problems in JavaScript code.

Table C.37: Attributes

Name | Type | Description | Default | Required
--- | --- | --- | --- | ---
`file` | `String` | Single file to perform check on. | n/a | No
`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

### C.31.1 Example

            <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>

Prev | Up | Next
C.30 IoncubeLicenseTask | Home | C.32 JslLintTask