Update documentation
parent
1f0e8f021e
commit
291822a195
|
@ -2,17 +2,22 @@ Runs PHP Mess Detector against your build. Records some key metrics, and also re
|
|||
|
||||
## Configuration
|
||||
### Options
|
||||
* **allowed_warnings** [int, optional] - The warning limit for a successful build (default: 0)
|
||||
* **suffixes** [array, optional] - An array of file extensions to check (default: 'php')
|
||||
* **ignore** [array, optional] - An array of files/paths to ignore (default: build_settings > ignore)
|
||||
* **path** [string, optional] - Directory in which PHPMD should run (default: build root)
|
||||
* **rules** [array, optional] - Array of rulesets that PHPMD should use when checking your build or a string containing at least one slash, will be treated as path to PHPMD ruleset. See http://phpmd.org/rules/index.html for complete details on the rules. (default: ['codesize', 'unusedcode', 'naming'])
|
||||
- **allowed_warnings** [int, optional] - The warning limit for a successful build (default: 0). -1 disables warnings. Setting allowed_warnings in conjunction with zero_config will override zero_config.
|
||||
- **suffixes** [array, optional] - An array of file extensions to check (default: 'php')
|
||||
- **ignore** [array, optional] - An array of files/paths to ignore (default: build_settings > ignore)
|
||||
- **path** [string, optional] - Directory in which PHPMD should run (default: build root)
|
||||
- **rules** [array, optional] - Array of rulesets that PHPMD should use when checking your build or a string containing at least one slash, will be treated as path to PHPMD ruleset. See http://phpmd.org/rules/index.html for complete details on the rules. (default: ['codesize', 'unusedcode', 'naming']).
|
||||
- **zero_config** [bool, optional] - Suppresses build failure on errors and warnings if set to true. (default: false).
|
||||
|
||||
|
||||
### Example
|
||||
```yml
|
||||
test:
|
||||
php_mess_detector:
|
||||
path: 'app'
|
||||
ignore:
|
||||
- 'vendor'
|
||||
allowed_warnings: -1
|
||||
rules:
|
||||
- "cleancode"
|
||||
- "controversial"
|
||||
|
@ -21,6 +26,5 @@ test:
|
|||
- "naming"
|
||||
- "unusedcode"
|
||||
- "somedir/customruleset.xml"
|
||||
allow_failures: true
|
||||
zero_config: true # do not make build as failed if something was detected
|
||||
zero_config: true
|
||||
```
|
Loading…
Reference in a new issue