Skip to content

Commit 0cdbdec

Browse files
committed
add help entry for --allow-empty-file-list
1 parent 61fcf51 commit 0cdbdec

File tree

2 files changed

+27
-22
lines changed

2 files changed

+27
-22
lines changed

src/Util/Help.php

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ final class Help
3636
* @var array<string> List of the option names.
3737
*/
3838
public const DEFAULT_LONG_OPTIONS = [
39+
'allow-empty-file-list',
3940
'basepath',
4041
'bootstrap',
4142
'colors',
@@ -491,79 +492,83 @@ private function getAllOptions()
491492
];
492493

493494
$options['Reporting Options'] = [
494-
'report' => [
495+
'report' => [
495496
'argument' => '--report=<report(s)>',
496497
'description' => 'A comma-separated list of reports to print. Available reports: "full", "xml", "checkstyle", "csv", "json", "junit", "emacs", "source", "summary", "diff", "svnblame", "gitblame", "hgblame", "notifysend" or "performance".' . "\n"
497498
. 'Or specify the path to a custom report class. By default, the "full" report is displayed.',
498499
],
499-
'report-file' => [
500+
'report-file' => [
500501
'argument' => '--report-file=<reportFile>',
501502
'description' => 'Write the report to the specified file path.',
502503
],
503-
'report-report' => [
504+
'report-report' => [
504505
'argument' => '--report-<report>=<reportFile>',
505506
'description' => 'Write the report specified in <report> to the specified file path.',
506507
],
507-
'report-width' => [
508+
'report-width' => [
508509
'argument' => '--report-width=<reportWidth>',
509510
'description' => 'How many columns wide screen reports should be. Set to "auto" to use current screen width, where supported.',
510511
],
511-
'basepath' => [
512+
'basepath' => [
512513
'argument' => '--basepath=<basepath>',
513514
'description' => 'Strip a path from the front of file paths inside reports.',
514515
],
515-
'blank-line-1' => ['spacer' => ''],
516+
'blank-line-1' => ['spacer' => ''],
516517

517-
'w' => [
518+
'w' => [
518519
'argument' => '-w',
519520
'description' => 'Include both warnings and errors (default).',
520521
],
521-
'n' => [
522+
'n' => [
522523
'argument' => '-n',
523524
'description' => 'Do not include warnings. Shortcut for "--warning-severity=0".',
524525
],
525-
'severity' => [
526+
'severity' => [
526527
'argument' => '--severity=<severity>',
527528
'description' => 'The minimum severity required to display an error or warning. Defaults to 5.',
528529
],
529-
'error-severity' => [
530+
'error-severity' => [
530531
'argument' => '--error-severity=<severity>',
531532
'description' => 'The minimum severity required to display an error. Defaults to 5.',
532533
],
533-
'warning-severity' => [
534+
'warning-severity' => [
534535
'argument' => '--warning-severity=<severity>',
535536
'description' => 'The minimum severity required to display a warning. Defaults to 5.',
536537
],
537-
'blank-line-2' => ['spacer' => ''],
538+
'blank-line-2' => ['spacer' => ''],
538539

539-
's' => [
540+
's' => [
540541
'argument' => '-s',
541542
'description' => 'Show sniff error codes in all reports.',
542543
],
543-
'ignore-annotations' => [
544+
'ignore-annotations' => [
544545
'argument' => '--ignore-annotations',
545546
'description' => 'Ignore all "phpcs:..." annotations in code comments.',
546547
],
547-
'colors' => [
548+
'colors' => [
548549
'argument' => '--colors',
549550
'description' => 'Use colors in screen output.',
550551
],
551-
'no-colors' => [
552+
'no-colors' => [
552553
'argument' => '--no-colors',
553554
'description' => 'Do not use colors in screen output (default).',
554555
],
555-
'p' => [
556+
'p' => [
556557
'argument' => '-p',
557558
'description' => 'Show progress of the run.',
558559
],
559-
'q' => [
560+
'q' => [
560561
'argument' => '-q',
561562
'description' => 'Quiet mode; disables progress and verbose output.',
562563
],
563-
'm' => [
564+
'm' => [
564565
'argument' => '-m',
565566
'description' => 'Stop error messages from being recorded. This saves a lot of memory but stops many reports from being used.',
566567
],
568+
'allow-empty-file-list' => [
569+
'argument' => '--allow-empty-file-list',
570+
'description' => 'Suppress "No files were checked" error.',
571+
],
567572
];
568573

569574
$options['Configuration Options'] = [

tests/Core/Util/Help/HelpTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ public static function dataOptionFiltering()
235235
'Scan targets' => 8,
236236
'Rule Selection Options' => 7,
237237
'Run Options' => 8,
238-
'Reporting Options' => 19,
238+
'Reporting Options' => 20,
239239
'Configuration Options' => 8,
240240
'Miscellaneous Options' => 5,
241241
],
@@ -247,7 +247,7 @@ public static function dataOptionFiltering()
247247
'Scan targets' => 8,
248248
'Rule Selection Options' => 5,
249249
'Run Options' => 4,
250-
'Reporting Options' => 14,
250+
'Reporting Options' => 15,
251251
'Configuration Options' => 4,
252252
'Miscellaneous Options' => 5,
253253
],
@@ -273,7 +273,7 @@ public static function dataOptionFiltering()
273273
'Scan targets' => 8,
274274
'Rule Selection Options' => 7,
275275
'Run Options' => 8,
276-
'Reporting Options' => 19,
276+
'Reporting Options' => 20,
277277
'Configuration Options' => 8,
278278
],
279279
],

0 commit comments

Comments
 (0)