ObliviousHarmony / vscode-php-codesniffer

A VS Code extension for integrating PHP_CodeSniffer.
https://marketplace.visualstudio.com/items?itemName=obliviousharmony.vscode-php-codesniffer
Other
38 stars 2 forks source link

Added "Default" Standard #2

Closed ObliviousHarmony closed 3 years ago

ObliviousHarmony commented 3 years ago

All Submissions:

Changes proposed in this Pull Request:

As suggested by @dhrrgn in #1, this PR adds a "Default" option to phpCodeSniffer.standard. This will cause no --standard to be passed so that PHPCS can use its own default.

Closes #1.

How to test the changes in this Pull Request:

  1. Open a project that has a configuration file.
  2. Set phpCodeSniffer.standard as "Custom" and phpCodeSniffer.standardCustom as the configuration file's path.
  3. Intentionally create a problem for reference.
  4. Set phpCodeSniffer.standard as "Default" and erase phpCodeSniffer.standardCustom.
  5. Note that PHPCS is using the same standard still and the problem created in step 3 is still present.