When starting VSCode and opening a .ps1 file does not trigger a run of PSScriptAnalyzer automatically any more
System Details Output
### VSCode version: 1.28.0 431ef9da3cf88a... x64
### VSCode extensions:
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
### PSES version: 1.9.0.0
### PowerShell version:
Name Value
---- -----
PSVersion 5.1.14409.1012
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14409.1012
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Issue Description
When opening VS Code (1.28 -latest RTM release with the latest RTM 1.9.0 of the extension), with a file foo.ps with the content gci then the user used to see the PSScriptAnalyzer analysis right away e.g. as a squiggle under gci. Since one of the last extension updates (I cannot remember when I noticed that it stopped working), this does not happen any more and one can trigger the run of PSSA only manually by starting to type.
@SeeminglyScience thinks it might be the line below since "that catch block used to just be return. Pretty sure that's the only analysis related change I made"
https://github.com/PowerShell/PowerShellEditorServices/blob/67af23203c0d7aac52a6c5655d7d7f1202e80dd0/src/PowerShellEditorServices.Protocol/Server/LanguageServer.cs#L1505
Note that this does not happen in the combination of using code-insiders and the 2.0.0 preview of the extension. I suspect the culprit is rather the extension and not VSCode itself
Expected Behaviour
Show PSSA analysis after having opened a file in a new editor
Actual Behaviour
One needs to edit the file to eventually trigger a run of PSSA to see squiggles
Attached Logs
If needed I can supply them in case you cannot repro this issue.
Also seen this and just generally latency with PSScriptAnalyzer. Sometimes, even after fixing an alias to the full expression it still shows in the problem window and has the squiggly line. Have to delete and retype or change one of the other parts of the line (sometimes a few times) to get PSScriptAnalyzer to update the problem.
this is a pretty old issue and I can't repro:

I'll close this but let me know if you're still seeing this!
I'm having this issue. I get no analysis, and I can't auto-format any files since that uses psscriptanalyzer by default.