# classes/phing/tasks/ext/JslLintTask.php

## \JslLintTask
jump to top

A Javascript lint task. Checks syntax of Javascript files.

Javascript lint (http://www.javascriptlint.com) must be in the system path. This class is based on Knut Urdalen's PhpLintTask.

Extends from
  \Task
author
  Stefan Priebsch
copyright
  2001,2002 THYRELL. All rights reserved
package
  phing.tasks.ext
version
  $Id: JslLintTask.php 1273 2011-08-17 09:49:54Z mrook $

### Properties

`$badFiles= 'array'`
Default value `array` Details

Type

`$cache= 'null'`
Default value `null` Details

Type

`$conf= 'null'`
Default value `null` Details

Type

`$executable= 'jsl'`
Default value `jsl` Details

Type

`$file= ''`
Details

Type

`$filesets= 'array'`
Default value `array` Details

Type

`$haltOnFailure= 'false'`
Default value `false` Details

Type

`$hasErrors= 'false'`
Default value `false` Details

Type

`$showWarnings= 'true'`
Default value `true` Details

Type

`\PhingFile $tofile= 'null'`

Default value `null` Details

Type
  \PhingFile

### Methods

`createFileSet( ) : \FileSet`
Nested creator, creates a FileSet for this task
Returns

Type | Description
--- | ---
\FileSet |

`getExecutable( ) :`
`lint( string $file ) : void`
Performs the actual syntax check
Parameters

Name | Type | Description
--- | --- | ---
$file | string |

`main( ) :`
Execute lint check against PhingFile or a FileSet
`setCacheFile( \PhingFile $file ) :`
Whether to store last-modified times in cache
Parameters

Name | Type | Description
--- | --- | ---
$file | \PhingFile |

`setConfFile( \PhingFile $file ) :`
jsl config file
Parameters

Name | Type | Description
--- | --- | ---
$file | \PhingFile |

`setExecutable( $path ) :`
Parameters

Name | Type | Description
--- | --- | ---
$path |  |

`setFile( \PhingFile $file ) :`
File to be performed syntax check on
Parameters

Name | Type | Description
--- | --- | ---
$file | \PhingFile |

`setHaltOnFailure( boolean $aValue ) :`
The haltonfailure property
Parameters

Name | Type | Description
--- | --- | ---
$aValue | boolean |

`setShowWarnings( boolean $show ) :`
Sets the flag if warnings should be shown
Parameters

Name | Type | Description
--- | --- | ---
$show | boolean |

`setToFile( $tofile ) :`
File to save error messages to
Parameters

Name | Type | Description
--- | --- | ---
$tofile |  |

Documentation was generated by DocBlox 0.13.1.