Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allows to scan for complete directory #9

Closed
edafonseca opened this issue Jul 17, 2022 · 10 comments
Closed

Allows to scan for complete directory #9

edafonseca opened this issue Jul 17, 2022 · 10 comments

Comments

@edafonseca
Copy link

Hello,

Is there a way to scan a whole directory to generate "Problems" for all project ?

Thanks

@SanderRonde
Copy link
Owner

That should work fine if your phpstan.neon file includes the directory.

Or do you mean having a dedicated "scan this folder" command like the "scan current file" command?

@edafonseca
Copy link
Author

This is working great when saving a file, but is it possible to lint all project ? In actions, I only get "Scan current file for errors".

Actually, what I am looking for is to get in Problems tab the list of all project phpstan errors.

Thanks

@SanderRonde
Copy link
Owner

Ah interesting idea. I'll start working on making that possible :)

@edafonseca
Copy link
Author

Thanks a lot !! :)

@SanderRonde
Copy link
Owner

SanderRonde commented Jul 19, 2022

Done :) should be live in the newest version (2.2.0)

@edafonseca
Copy link
Author

Awesome !

However , here are some errors. When I run "check for project errors" :

  • PHPStan scan is timed out depending on this config : "Timeout in milliseconds for a single file check. After this time the checking process is canceled"
  • Scan ends with error : "PHPStan: process exited with error, see log for details"
  • In logs, I get
[exthost] [warning] [SanderRonde.phpstan-vscode] Accessing a resource scoped configuration without providing a resource is not expected. To get the effective value for '[sql]', provide the URI of a resource or 'null' for any resource.

Am I missing something ?

Thanks

@SanderRonde
Copy link
Owner

Ah looks like stuff is a bit broken then, will unpublish it while I investigate

SanderRonde added a commit that referenced this issue Jul 20, 2022
SanderRonde added a commit that referenced this issue Jul 23, 2022
@SanderRonde
Copy link
Owner

SanderRonde commented Jul 23, 2022

I just published a pre-release version (version 2.2.2) of the extension where I re-introduced the changes (this time I'm pretty sure I fixed the bugs). Could you give it a test and let me know if it works? Just click on the extension in your extensions sidebar and on the detail-page click on "Switch to Pre-Release Version".

@edafonseca
Copy link
Author

Awesome ! You now have the best phpstan extension on vscode 😍.

I have tried the 2.2.2 version, all good until now. I will keep going with it and let you know if I see some problems.

Thanks again :)

@SanderRonde
Copy link
Owner

Thanks for the kind words! Good to hear it all works, I'll publish it to the non-pre-release channel then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants