wongjn / vscode-php-sniffer

Visual Studio Code extension for PHP_Codesniffer validation and formatting.
https://marketplace.visualstudio.com/items?itemName=wongjn.php-sniffer
MIT License
46 stars 7 forks source link

Ignore project when using this extension #68

Closed emendelski closed 1 year ago

emendelski commented 1 year ago

Is your feature request related to a problem? Please describe. Many times I'm using legacy code where PHPCS was never used. And extension mark every mistake on those pages (a lot of squiggly lines). I won't fix those at this moment.

Zrzut ekranu 2023-05-12 o 12 34 52

Describe the solution you'd like I would like to have the option to disable this extension for a certain project (or workspace).

Describe alternatives you've considered I played with the settings in VS Code but with no result. I tried using phpcs.xml with exclude pattern but it doesn't work.

<?xml version="1.0"?>
<ruleset name="PHP_CodeSniffer">
    <description>PHP Code Sniffer configuration file.</description>
    <exclude-pattern>*</exclude-pattern>
</ruleset>

Additional context I have installed phpcs globally with the path in phpSniffer.executablesFolder

wongjn commented 1 year ago

Thank you for your suggestion! This is actually already possible in VSCode – consider disabling the extension for the particular workspace.