You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I created the new section about progress reporting on the "Reporting" page, I'd overlooked that the "Usage" page already contained a section on progress reporting.
This commit now removes the section from the "Reporting" page again and merges some of the information which was contained in that section, into the information about progress reporting on the "Usage" page.
Includes various tweaks and updates to the pre-existing information:
* Make it explicit how progress reporting can be enabled.
* Shorten the example output for progress.
* Mention the name of the configuration option to enable progress reporting by default.
* Refresh the example output for the verbose example.
Copy file name to clipboardExpand all lines: wiki/Usage.md
+28-29Lines changed: 28 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -216,48 +216,47 @@ A TOTAL OF 6 ERROR(S) WERE FOUND IN 2 FILE(S)
216
216
217
217
By default, PHP_CodeSniffer will run quietly, only printing the report of errors and warnings at the end. If you are checking a large number of files, you may have to wait a while to see the report. If you want to know what is happening, you can turn on progress or verbose output.
218
218
219
-
With progress output enabled, PHP_CodeSniffer will print a single-character status for each file being checked. The possible status characters are:
220
-
221
-
*`.` : The file contained no errors or warnings
222
-
*`E` : The file contained 1 or more errors
223
-
*`W` : The file contained 1 or more warnings, but no errors
224
-
*`S` : The file contained a [// phpcs:ignoreFile](https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki/Advanced-Usage#ignoring-files-and-folders) comment and was skipped
225
-
226
-
Progress output will look like this:
219
+
To enable progress reporting, use the `-p` command line argument.
220
+
With progress output enabled, PHP_CodeSniffer will print a single-character status for each file being checked, like so:
|`phpcs`|`E` (red) | Non-fixable error(s) found in the file |
234
+
||`E` (green) | Fixable error(s) found in the file |
235
+
||`W` (yellow) | Non-fixable warning(s) found in the file, but no errors |
236
+
||`W` (green) | Fixable warning(s) found in the file, but no errors |
237
+
|`phpcbf`|`F` (green) | Fixed errors and/or warnings in the file |
238
+
||`E` (red) | Unfixable errors or warnings in the file (fixer conflict) |
239
+
|`phpcs`/`phpcbf`|`.`| No errors or warnings found in the file |
240
+
||`S`| File was skipped |
241
+
243
242
> [!NOTE]
244
-
> You can configure PHP_CodeSniffer to show progress information by default using [the configuration option](https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki/Configuration-Options#showing-progress-by-default)</link>.
243
+
> You can configure PHP_CodeSniffer to show progress information by default using [the `show_progress`configuration option](https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki/Configuration-Options#showing-progress-by-default)</link>.
245
244
246
245
With verbose output enabled, PHP_CodeSniffer will print the file that it is checking, show you how many tokens and lines the file contains, and let you know how long it took to process. The output will look like this:
247
246
248
247
```
249
248
$ phpcs /path/to/code/CodeSniffer -v
250
249
251
-
Registering sniffs in PEAR standard... DONE (24 sniffs registered)
252
-
Creating file list... DONE (572 files in queue)
253
-
Processing AbstractDocElement.php [1093 tokens in 303 lines]... DONE in < 1 second (0 errors, 1 warnings)
254
-
Processing AbstractParser.php [2360 tokens in 558 lines]... DONE in 2 seconds (0 errors, 1 warnings)
255
-
Processing ClassCommentParser.php [923 tokens in 296 lines]... DONE in < 1 second (2 errors, 0 warnings)
256
-
Processing CommentElement.php [988 tokens in 218 lines]... DONE in < 1 second (1 error, 5 warnings)
257
-
Processing FunctionCommentParser.php [525 tokens in 184 lines]... DONE in 1 second (0 errors, 6 warnings)
258
-
Processing File.php [10968 tokens in 1805 lines]... DONE in 5 seconds (0 errors, 5 warnings)
259
-
Processing Sniff.php [133 tokens in 94 lines]... DONE in < 1 second (0 errors, 0 warnings)
260
-
Processing SniffException.php [47 tokens in 36 lines]... DONE in < 1 second (1 errors, 3 warnings)
250
+
Registering sniffs in PEAR standard... DONE (28 sniffs registered)
251
+
Creating file list... DONE (158 files in queue)
252
+
Changing into directory src/Standards/Generic/Sniffs/Arrays
253
+
Processing ArrayIndentSniff.php [1409 tokens in 193 lines]... DONE in 39ms (4 errors, 20 warnings)
254
+
Processing DisallowLongArraySyntaxSniff.php [405 tokens in 72 lines]... DONE in 11ms (0 errors, 4 warnings)
255
+
Processing DisallowShortArraySyntaxSniff.php [331 tokens in 61 lines]... DONE in 9ms (4 errors, 3 warnings)
256
+
Changing into directory src/Standards/Generic/Sniffs/Classes
257
+
Processing DuplicateClassNameSniff.php [800 tokens in 118 lines]... DONE in 24ms (0 errors, 0 warnings)
258
+
Processing OpeningBraceSameLineSniff.php [936 tokens in 123 lines]... DONE in 26ms (4 errors, 12 warnings)
259
+
...
261
260
```
262
261
263
262
<palign="right"><ahref="#table-of-contents">back to top</a></p>
0 commit comments