Closed fritz-c closed 10 months ago
Is this unexpected behavior? From this comment by the creator of PHPStan it appears to be intentional.
I believe it is the expected behavior for phpstan. Using that configuration in combination with your extension, however, I couldn't find any way to avoid the repeated appearance of the error notification when I had the extension configured to lint the current file every time I save.
Ah never mind this is indeed the fault of the extension. It's triggering checks on files that it shouldn't check. Will fix when I've got some time.
Sounds good, thanks for looking into it.
I figured out a fix for myself in the meantime, of using path
properties on ignoreErrors
entries in the phpstan.neon
file instead of excludePaths
.
I think I got a fix for this issue. Would you mind testing it for me? I've attached the .vsix
(VSCode extension installer) file as a .zip
file since github doesn't allow uploading of .vsix
files. Could you:
.zip
Thanks in advance!
Issues go stale after too much time without activity. If inactive for another 7 days this issue will be closed.
Looked into this some more, this should be automatically fixed when moving to project-wide checking. That is currently active in the pre-release version of the extension.
I have a
phpstan.neon
config file that looks more or less like the following:and my VSCode config contains the following:
The extension works perfectly for almost all files, but when I edit a file under
tests/
, I get the following error in the console, and a VSCode notification pops up:It appears that the
phpstan.neon
config is being read in properly, but calling phpstan with a file it has explicitly been told to ignore results in 0 files being checked and that results in an error.