Open garygreen opened 5 years ago
It looks like the extension doesn't generally respect if you set this sort of thing in the config itself either.
For example, our config has:
$finder = \PhpCsFixer\Finder::create()
->exclude('vendor')
->in(__DIR__.'/[redacted]');
But cs fixer runs on every file regardless of this config.
@probablyup what do you have vscode-php-cs-fixer.config
set to?
Maybe a setting to set --path-mode
to intersection
? See https://cs.symfony.com/doc/usage.html - as far as I understand it that should take into account the config finder rather than over-riding it.
PR for this here: https://github.com/fterrag/vscode-php-cs-fixer/pull/18
Occasionally I edit files in
vendor
which then triggers the auto save fix which can be frustrating, as it's usually unintentional. You can temporarily disable the fix on save, but this is fiddly as you have to go into the config every time.It would be great to be able to configure a whitelist/blacklist of paths to enable triggering fix on save:
Matches are done in order, first match takes priority. Paths are matched from the workspace root path, so for example when a workspace is opened for
C:\Sites\my-project
and following the above examples, it would match for:Is this an idea you would be open to adding?