The PhpLintTask
checks syntax (lint) on one or more PHP source
code files.
Table B.46: Attributes
Name | Type | Description | Default | Required |
---|---|---|---|---|
file | String | Path to source file | n/a | No |
haltonfailure | Boolean | Stop the build process if the linting process encounters an error. | false | No |
errorproperty | String | The name of a property that will be set to contain the error string (if any). | n/a | No |
interpreter | String | Path to alternative PHP interpreter | Defaults to the ${php.interpreter} property which is
the interpreter used to execute phing itself. | No |
cachefile | String | If set, enables writing of last-modified times to
cachefile , to speed up processing of files that
rarely change | none | No |
level | String | Control the level at which phplint reports status messages. One of
error , warning ,
info , verbose ,
debug . | debug | No |
tofile | String | File to write list of 'bad files' to. | n/a | No |
deprecatedAsError | Boolean | Whether to treat deprecated warnings (introduced in PHP 5.3) as errors. | false | No |
<phplint file="path/to/source.php"/>
Checking syntax of one particular source file.
<phplint> <fileset dir="src"> <include name="**/*.php"/> </fileset> </phplint>
Check syntax of a fileset of source files.