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

Pass Path To PHPCS #17

Closed ObliviousHarmony closed 3 years ago

ObliviousHarmony commented 3 years ago

All Submissions:

Changes proposed in this Pull Request:

Since some sniffs check the file path it makes sense for us to send the path using PHPCS' phpcs_input_file: [path] feature. When prepended to the content this line is used by PHPCS to set the filename of STDIN files.

Closes https://github.com/ObliviousHarmony/vscode-php-codesniffer/issues/16.

How to test the changes in this Pull Request:

  1. Try out an invalid filename sniff and make sure it works now.