C.32 JslLintTask
Prev | Appendix C. Optional tasks | Next

## C.32 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.38: Attributes

Name | Type | Description | Default | Required
--- | --- | --- | --- | ---
`executable` | `String` | Path to JSL executable | jsl | No
`file` | `String` | Path to source file | n/a | No
`haltonfailure` | `Boolean` | Stop the build process if the linting process encounters an error. | `false` | No
`haltonwarning` | `Boolean` | Stop the build process if the linting process encounters a warning. | `false` | No
`showwarnings` | `Boolean` | Sets the flag if warnings should be shown. | `true` | No
`cachefile` | `String` | If set, enables writing of last-modified times to `cachefile`, to speed up processing of files that rarely change | none | No
`conffile` | `String` | Path to JSL config file | none | No
`tofile` | `String` | File to write list of 'bad files' to. | n/a | No

### C.32.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.32.2 Supported Nested Tags

- `fileset`

Prev | Up | Next
C.31 JsHintTask | Home | C.33 JsMinTask