From 1e7cfdfc3650087ae07ff9d98dbd1f7ae6d05e84 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Sat, 8 Feb 2025 00:07:53 +0100 Subject: [PATCH] Help: update list of config options Follow up on 447 I noticed while working on something else that some typical config options were missing from the list in the help text. The difference between the previously listed ones and the additional options I'm now adding to the list, is that the original set of options are options which the `Config` class manages and for which it has a default value, while the additional options I'm now adding are used at runtime in various places by PHPCS, but do not have default value management in the `Config` class. Whether default value handling of these options should be added to the `Config` class is up for debate, however, making it more discoverable that these options _exist_ and can be used, seems like an easy win for usability. * `installed_paths` is probably the best known one and is used to register external standards with PHPCS. It is used in the `Util\Standards` class. * `php_version` is a way to tell PHPCS what PHP version they code is supposed to run on. It is used by select sniffs. * `ignore_errors_on_exit` and `ignore_warnings_on_exit` influence the exit code used by PHPCS and is used in the `Runner` class. These additional options are all mentioned and described in more detail in the wiki: https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki/Configuration-Options Fixes squizlabs/PHP_CodeSniffer 2412 --- src/Util/Help.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Util/Help.php b/src/Util/Help.php index a6a64eedb7..68d7976782 100644 --- a/src/Util/Help.php +++ b/src/Util/Help.php @@ -573,7 +573,7 @@ private function getAllOptions() 'config-explain' => [ 'text' => 'Default values for a selection of options can be stored in a user-specific CodeSniffer.conf configuration file.'."\n" - .'This applies to the following options: "default_standard", "report_format", "tab_width", "encoding", "severity", "error_severity", "warning_severity", "show_warnings", "report_width", "show_progress", "quiet", "colors", "cache", "parallel".', + .'This applies to the following options: "default_standard", "report_format", "tab_width", "encoding", "severity", "error_severity", "warning_severity", "show_warnings", "report_width", "show_progress", "quiet", "colors", "cache", "parallel", "installed_paths", "php_version", "ignore_errors_on_exit", "ignore_warnings_on_exit".', ], 'config-show' => [ 'argument' => '--config-show',