Skip to content

Commit 5634b9b

Browse files
committed
4.0 | Wiki: change cumulative exit codes table and example paragraph
- Added new column to the cumulative exit codes table to define the codes that were combined, instead of defining them in brackets in the descriptions. - Removed the now redundant cumulative exit code example. - Changed the cumulative table header to describe the cumulative behaviour.
1 parent 0a2036f commit 5634b9b

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

wiki/Advanced-Usage.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -524,16 +524,13 @@ As of PHP_CodeSniffer 4.0.0, exit codes are cumulative and composed as follows:
524524
| `16` | processing error - blocking the actual run of PHP_CodeSniffer, like a parse error in an XML ruleset |
525525
| `64` | requirements for running not met (i.e. minimum PHP version doesn't comply, missing required extensions) |
526526

527-
Example: when running `phpcs`, if both auto-fixable as well as non-auto-fixable issues are found, the exit code will be `3` (`1` + `2`).
528-
529-
Cumulative exit codes:
530-
531-
| Exit code | Meaning |
532-
|-----------|----------------------------------------------------------------------------------------------------------------|
533-
| `3` | issues found, mix of auto-fixable and non-auto-fixable (`1` + `2`) (phpcs only) |
534-
| `5` | issues found, auto-fixable, but some failed to fix (`1` + `4`) (phpcbf only) |
535-
| `7` | issues found, mix of auto-fixable and non-auto-fixable, but some failed to fix (`1` + `2` + `4`) (phpcbf only) |
527+
The exit codes in some situations can be combined, resulting in a new exit code. These cumulative exit codes are as follows:
536528

529+
| Exit code | Exit codes used | Meaning |
530+
| --------- | --------------- | -------------------------------------------------------------------------------------------- |
531+
| `3` | `1` + `2` | issues found, mix of auto-fixable and non-auto-fixable (phpcs only) |
532+
| `5` | `1` + `4` | issues found, auto-fixable, but some failed to fix (phpcbf only) |
533+
| `7` | `1` + `2` + `4` | issues found, mix of auto-fixable and non-auto-fixable, but some failed to fix (phpcbf only) |
537534

538535
The exit codes can be influenced by the following configuration flags: [`ignore_errors_on_exit`](https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki/Configuration-Options#ignoring-errors-when-generating-the-exit-code), [`ignore_warnings_on_exit`](https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki/Configuration-Options#ignoring-warnings-when-generating-the-exit-code) and [`ignore_non_auto_fixable_on_exit`](https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki/Configuration-Options#ignoring-non-auto-fixable-issues-when-generating-the-exit-code).
539536

0 commit comments

Comments
 (0)