ObliviousHarmony / vscode-php-codesniffer

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

Automatic `phpcs` Discovery #3

Closed ObliviousHarmony closed 3 years ago

ObliviousHarmony commented 3 years ago

Problem Description

Many of the other PHPCS extensions in the marketplace support automatically discovering the phpcs executable.

Proposed Solution

We should add a new phpCodeSniffer.executableAuto option of type "boolean". This option can then be used in the Configuration class to automatically discover the vendor/bin/phpcs file in the file's directory. We should traverse from the file's directory to its working directory searching and use the first file that we discover.