Help: update list of config options #809
Merged
+1
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
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 theConfig
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 theUtil\Standards
class.php_version
is a way to tell PHPCS what PHP version the code is supposed to run on. It is used by select sniffs.ignore_errors_on_exit
andignore_warnings_on_exit
influence the exit code used by PHPCS and is used in theRunner
class.These additional options are all mentioned and described in more detail in the wiki: https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki/Configuration-Options
Suggested changelog entry
The
-h
option now contains a more extensive list of "config" options which can be set.Related issues/external references
Fixes squizlabs/PHP_CodeSniffer#2412
/cc @aik099