-
Notifications
You must be signed in to change notification settings - Fork 513
Problems appear only when file is highlighted #4113
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
Comments
It only shows for open files, not related to focus. Double click on two files so both editors are open at the same time. This is by design since PowerShell isn't a project like c# etc, but loose files. Edit: Didn't notice the one that was stuck in problems. Sure they're not open somewhere? |
Well, the behavior isn't as you describe it - here are problems loaded from even different file which isn't even available in the session ;) What more is that I would prefer to see all problems across all files, but I guess this would be a problem performance wise unless this is in place: #3884 And in this I've closed all files: And the Example23 was one of the last files I actually closed and explicitly left it with an error, and then README showed up in problems. It's not at all consistent. |
Hey @PrzemyslawKlys and @fflaten can I ask for a summary of what the current behavior seems to be, and what you think it should be? I.e. what is it I'm trying to fix 😅 Thanks both! |
@andschwa We have conflicting views with @fflaten 😂 so you would need to implement switch that can be toggled between those two. Basically what happens is that when the script has errors, or has warnings it normally displays it within code pane, but as shown on screenshot in the file list view the file with problems is highlighted as well (in my screen it's either orange or red). Currently it seems that the "problems/warnings" is supposed to show on listview only when you are looking at specific file (or I guess should show warnings for also all opened files within code) and when you move out, close them, the coloring on files should disappear. For most part - this happens, but as shown on the gif not all the time (for whatever reason). This is where our views are different:
Of course that brings me to another issue of hard to configure PSScriptAnalyzer which uses script based configuration instead of standard GUI/JSON config - but that's another problem/demand from me :-p |
@PrzemyslawKlys We don't necessarily disagree. My previous comment was about how I remembered the code being (intended behavior). I'm still not able to reproduce it as problems get cleared consistently when I close files. So what you're seeing is a bug imo. As a separate feature request If all the analyzer background-jobs would further delay the already slow formatter (compete for the same pipeline), then I'd generally downvote this until something like hosted PSSA implementation or even PSSA v2 (ETA still unknown 🙁) is ready which I'd hope would improve the performance issues a lot. |
You can exclude certain folders from being analyzed at all - in the short time. |
You overestimate how organized I am 😄 |
That's helpful! Thank you for the clarifications. Since @SeeminglyScience already coded in a setting |
Sounds good.
Well, there is #3048. Pester tests can generate a lot of analyzer alerts because of ex "unused variables" created in BeforeAll meant to be used in the following It-tests. I need search to work, while ignoring analyzer warnings for |
Prerequisites
Summary
I think that the last preview release that had broken PSScriptAnalyzer exposed a different problem that I've not noticed before. The problems reported by it are sometimes shown when the file is highlighted and disappear once you move out of the file (notice the problem window and highlights on the right). In some cases, it highlights it forever tho.
PowerShell Version
Visual Studio Code Version
Extension Version
Steps to Reproduce
Jump around files with problems in them
Visuals
No response
Logs
No response
The text was updated successfully, but these errors were encountered: