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

Use Glob Patterns For Exclusions Instead Of Regular Expressions #51

Closed ObliviousHarmony closed 2 years ago

ObliviousHarmony commented 2 years ago

All Submissions:

Changes proposed in this Pull Request:

When it comes to path-based rules, VS Code and various extensions have a strong preference toward using glob patterns. Given that precedent, this pull request adds a new phpCodeSniffer.exclude option that accepts globs instead of regular expressions. In addition, the phpCodeSniffer.ignorePatterns option has been deprecated.

Closes #48.

How to test the changes in this Pull Request:

  1. Open a file that has problems.
  2. Set the phpCodeSniffer.exclude setting to one that would exclude the file.
  3. With this pull request, the file should have no more problems because it isn't being linted.
  4. Erase the phpCodeSniffer.exclude option and use a regular expression to exclude the file in phpCodeSniffer.ignorePatterns.
  5. With this pull request, the file should have no problems because it isn't being linted.
  6. Verify that the two options are combined.