|
| 1 | +# `run` |
| 2 | + |
| 3 | +This command runs a configured build task. |
| 4 | + |
| 5 | +Should the task fail, it will be reported with a non-zero exit code (unless option `--exit-0` has been passed). |
| 6 | + |
| 7 | +If the passed task name is a chain, all tasks will get executed in sequential order and the result will get logged. |
| 8 | + |
| 9 | +### Arguments |
| 10 | + |
| 11 | +`task` |
| 12 | +: Define a specific task which should be run (default: `default`) |
| 13 | + |
| 14 | +### Options |
| 15 | + |
| 16 | + |
| 17 | +`--exit-0` |
| 18 | +: Forces the exit code to 0 - this is useful to "ignore" failures in CI as "allow-failure" mode. |
| 19 | + |
| 20 | +`-r, --report=REPORT` |
| 21 | +: Set the report format(s) that shall be created (default: `file-report`). |
| 22 | + |
| 23 | + This can be passed multiple times. |
| 24 | + |
| 25 | + Available options are: |
| 26 | + |
| 27 | + - `file-report` - an xml file tracking violations organized by files. |
| 28 | + - `task-report` - an xml file tracking violations organized by check tasks. |
| 29 | + - `checkstyle` - [checkstyle](https://checkstyle.org/) compatible XML output which is used by many tools. |
| 30 | + |
| 31 | +`-o, --output=OUTPUT` |
| 32 | +: Set a specific console output format (default: `default`). |
| 33 | + |
| 34 | + This can be passed multiple times. |
| 35 | + |
| 36 | + Available options are: |
| 37 | + |
| 38 | + - `default` - The default phpcq output. |
| 39 | + - `github-action` - Github action compatible output. |
| 40 | + |
| 41 | +`--threshold=THRESHOLD` |
| 42 | +: Set the minimum threshold for diagnostics to be reported - any severity below this will not get reported (default: |
| 43 | + `marginal`). |
| 44 | + |
| 45 | + Available options are (in ascending order): |
| 46 | + |
| 47 | + - `none` |
| 48 | + - `info` |
| 49 | + - `minor` |
| 50 | + - `marginal` |
| 51 | + - `major` |
| 52 | + - `fatal` |
| 53 | + |
| 54 | +`-j, --threads=THREADS` |
| 55 | +: Set the amount of threads to run in parallel (default: `nproc`). |
| 56 | + |
| 57 | + The allowed values range from `1` (single thread) to the amount of available logical processors (if it can be |
| 58 | + determined) |
| 59 | + |
| 60 | +`-c, --config=CONFIG` |
| 61 | +: The configuration file to use. |
| 62 | + |
| 63 | + If not given, the following filenames are tried (in the current working directory): |
| 64 | + |
| 65 | + - .phpcq.yml |
| 66 | + - phpcq.yml |
| 67 | + - .phpcq.yml.dist |
| 68 | + - phpcq.yml.dist |
| 69 | + |
| 70 | +`--home-dir=HOME-DIR` |
| 71 | +: Path to the phpcq home directory (default: `$(CWD)/.phpcq`) |
| 72 | + |
| 73 | +`--ignore-platform-reqs` |
| 74 | +: Ignore platform requirements (`php` & `ext-` packages). |
| 75 | + |
| 76 | +`-ff, --fast-finish` |
| 77 | +: Do not keep going and execute all tasks but break on first error. |
0 commit comments