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

Respect file-related settings in a phpcs.xml #4

Closed wongjn closed 5 years ago

wongjn commented 5 years ago

The extension is not following these configs:

    <!-- What to scan -->
    <file>.</file>
    <!-- Ignoring Files and Folders:
        https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#ignoring-files-and-folders -->
    <exclude-pattern>api-reference/</exclude-pattern>
    <exclude-pattern>dist/</exclude-pattern>
    <exclude-pattern>node_modules/</exclude-pattern>
    <exclude-pattern>resources/</exclude-pattern>
    <exclude-pattern>vendor/</exclude-pattern>
    <!-- Scrutinizer dependency -->
    <exclude-pattern>wordpress/</exclude-pattern>

It's pointing errors at files inside vendor folder, but it's on exclude-pattern tag.

Originally posted by @elvishp2006 in https://github.com/wongjn/vscode-php-sniffer/issues/2#issuecomment-453290792