C.30 JsHintTask

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

Table C.35: Attributes

NameTypeDescriptionDefaultRequired
fileStringSingle file to perform check on.n/aNo
haltOnErrorbooleanShould the build fail when there are errors in the JS code?falseNo
haltOnWarningbooleanShould the build fail when there are warnings in the JS code?falseNo
checkstyleReportPathStringPath where the the report in Checkstyle format should be saved.n/aNo

C.30.1 Example

        <jshint
            haltonerror="false"
            haltOnWarning="false"
            checkstyleReportPath="${project.basedir}/build/checkstyle-jshint.xml">
            <fileset dir="${project.basedir}/public_html/www/js">
                <include name="**/**.js"/>
                <exclude name="js-cache/**"/>
            </fileset>
        </jshint>