C.44 JslLintTask

The JslLintTask uses the Javascript Lint program to check the sytax on one or more JavaScript source code files.

NB: the Javascript lint program must be in the system path!

Table C.53: Attributes

NameTypeDescriptionDefaultRequired
executableStringPath to JSL executablejslNo
fileStringPath to source filen/aNo, unless no fileset elements are present
haltonfailureBooleanStop the build process if the linting process encounters an error.falseNo
haltonwarningBooleanStop the build process if the linting process encounters a warning.falseNo
showwarningsBooleanSets the flag if warnings should be shown.trueNo
cachefileStringIf set, enables writing of last-modified times to cachefile, to speed up processing of files that rarely changenoneNo
conffileStringPath to JSL config filenoneNo
tofileStringFile to write list of 'bad files' to.n/aNo

C.44.1 Example

<jsllint
            file="path/to/source.js"/>

Checking syntax of one particular source file.

<jsllint>
  <fileset dir="src">
    <include name="**/*.js"/>
  </fileset>
</jsllint>

Check syntax of a fileset of source files.

C.44.2 Supported Nested Tags