PHPLint is a validator and documentator for PHP 5 and PHP 7 programs.
Patterns to include in reports.
Note: The input patterns are not applied when running PHPLint in order to avoid false-positives as much as possible since PHPLint considers dependency between files and filtering the input files affects how PHPLint detects issues. Therefore, the files excluded by the patterns are always processed and you may even see logs related to the excluded files in the job console. However, Inspecode eventually ignores any issues detected on the excluded files when generating job reports.
Patterns to exclude from reports.
Note: Just like
input:, the ignore patterns are not applied when running PHPLint.
Amount of CPU. The default machine has
0.25 CPU with
960 MiB RAM.
Inspecode automatically specifies
-d memory_limit=<limit> to PHP in order to configure the maximum amount of memory that PHPLint is allowed to allocate according to this value.
240 MiB RAM for system, and makes the rest of RAM available to PHPLint for memory allocation.
-d memory_limit=720M is specified by default (for
-d memory_limit=5520M is specified for
Note: Inspecode uses a customized version of
phplscript to specify the options to PHP through
Below is the list of options that are supported:
--php-version V set PHP version V (either 5 or 7 (default)) --modules-path PATH set the path[s] to modules dir[s] (".") --[no-]is-module parsed file is a module (FALSE) --[no-]recursive follows require_once recursively (TRUE) --[no-]ctrl-check check control chars in strings (TRUE) --[no-]ascii-ext-check check extended ASCII chars in strings (TRUE) --[no-]print-notices print notices (TRUE) --[no-]print-warnings print warnings (TRUE) --[no-]print-errors print errors (TRUE) --[no-]parse-phpdoc parse DocBlock comments (TRUE) --[no-]print-context print error context (FALSE) --[no-]print-source print source (FALSE) --[no-]report-unused report unused IDs (TRUE) --[no-]report-prototypes reports methods' prototypes of the parsed classes --tab-size N set tabulation to N spaces (8)
No tool specific severity levels are available.
Note: The incremental analysis cannot be supported for PHPLint. This is because PHPLint validates source files with considering dependency between them and the results on unchanged files can be affected by changed files.
No tool specific experimental options are available.
With default options:
inspecode: tools: phplint: default
With custom machine:
inspecode: tools: phplint: machine: cpu: 1.5 # 1.5 CPU, 5760 MiB RAM
With custom options:
inspecode: tools: phplint: options: --php-version: 7 --tab-size: 4
PHPLint may detect false-positives especially when dependencies cannot be resolved properly. Inspecode attempts to avoid the false-positives by giving all source files to PHPLint in lexical order, but that is not a perfect solution. If the false-positives are detected in your repository, consider explicitly importing the modules and the packages your source depends on by following the document below.