-
-
Notifications
You must be signed in to change notification settings - Fork 89
Description
Is your feature request related to a problem?
Path to the CodeSniffer.conf does not appear to be configurable, or at least I have not found how to do it.
The docs refer to "user specific configuration file" but I have not found documentation where that might be.
The only path I have found working for a composer install is vendor/squizlabs/php_codesniffer/CodeSniffer.conf
, but that is problematic because if it exists before phpcs is installed (e.g. from a git checkout), it gets somehow removed by composer install
. So it's not nicely shareable via git.
Describe the solution you'd like
Would be nice to load the configuration file (in addition to the current location(s) used) from $CURRENT_DIR/.config/CodeSniffer.conf
by default, no matter the install method. For rationale for the .config/
dir, see https://github.com/pi0/config-dir. Failing that, looking up from $CURRENT_DIR/CodeSniffer.conf
or something like that would also be an improvement.
While at it, could be useful to also make path to the config file configurable via an command line option or an environment variable.
Alternatively, make it possible to set these values via phpcs.xml
(see the comment below for more discussion on this).
Additional context (optional)
- I have read the Contribution Guidelines and this is not a support question.
- I intend to create a pull request to implement this feature.