# tasks/ext/JslLintTask.php

## \JslLintTask
jump to top

Package: phing\tasks\ext

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.

Parent(s)
  \Task < \ProjectComponent
Author
  Stefan Priebsch
Version
  $Id: JslLintTask.php 1273 2011-08-17 09:49:54Z mrook $

### Properties

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

Type
  n/a

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

Type
  n/a

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

Type
  n/a

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

Type
  n/a

`$file= ''`
Details

Type
  n/a

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

Type
  n/a

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

Type
  n/a

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

Type
  n/a

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

Type
  n/a

`\PhingFile $tofile= 'null'`

Default value `null` Details

Type
  \PhingFile

### Methods

`createFileSet( ) : \FileSet`

Nested creator, creates a FileSet for this task

Returns

Type | Description
--- | ---
\FileSet | The created fileset object

`getDescription( ) : void`

`getExecutable( ) : void`

`getLocation( ) : void`

`getOwningTarget( ) : void`

`getProject( ) : void`

`getRegisterSlot( ) : void`

`getRuntimeConfigurableWrapper( ) : void`

`getTaskName( ) : void`

`getTaskType( ) : void`

`init( ) : void`

`lint( string $file ) : void`

Performs the actual syntax check

Parameters

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

`log( ) : void`

`main( ) : void`

Execute lint check against PhingFile or a FileSet

`maybeConfigure( ) : void`

`perform( ) : void`

`setCacheFile( \PhingFile $file ) : void`

Whether to store last-modified times in cache

Parameters

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

`setConfFile( \PhingFile $file ) : void`

jsl config file

Parameters

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

`setDescription( ) : void`

`setExecutable( $path ) : void`

Parameters

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

`setFile( \PhingFile $file ) : void`

File to be performed syntax check on

Parameters

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

`setHaltOnFailure( boolean $aValue ) : void`

The haltonfailure property

Parameters

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

`setLocation( ) : void`

`setOwningTarget( ) : void`

`setProject( ) : void`

`setRuntimeConfigurableWrapper( ) : void`

`setShowWarnings( boolean $show ) : void`

Sets the flag if warnings should be shown

Parameters

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

`setTaskName( ) : void`

`setTaskType( ) : void`

`setToFile( $tofile ) : void`

File to save error messages to

Parameters

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

Documentation was generated by DocBlox 0.17.1.