You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Document formatting fails on seemingly random pieces of code. Even if diagnostics enabled, there no meaningful errors aside from the extension logging these:
[Warn - 2:02:18 PM] Microsoft.PowerShell.EditorServices.Services.Analysis.PssaCmdletAnalysisEngine: Errors found while formatting file:
|
The psm1 file failing to be formatted contains >4000 lines of code which execute without a problem. However, I'm unable to locate the appropriate code that might trigger this issue.
Visuals
No response
Logs
u
The text was updated successfully, but these errors were encountered:
@andyleejordan there was a new PSScriptAnalyzer release, there may be a regression with that. @cythrault do you have the newer psscriptanalyzer installed separate from the extension?
@andyleejordan there was a new PSScriptAnalyzer release, there may be a regression with that. @cythrault do you have the newer psscriptanalyzer installed separate from the extension?
@JustinGrote Negative:
PS D:\PSWorkspace> Get-InstalledModule PSScriptAnalyzer
Get-Package: No match was found for the specified search criteria and module names 'PSScriptAnalyzer'.
And the only PSScriptAnalyzer module folder I see on that system is v1.21.0 which is under $env:USERPROFILE\.vscode\extensions\ms-vscode.powershell-2024.0.0\modules\PSScriptAnalyzer
@cythrault if you run Invoke-Scriptanalyzer on your script separately does it work fine? As you said it's a 4k+ line module so you may be running into an edge case with ScriptAnalyzer. VSCode is mostly a passthrough to that functionality so the issue would most likely be fixed there if anywhere instead of this repo. https://github.com/PowerShell/PSScriptAnalyzer
I cannot reproduce without a copy of your module, I'm not seeing any issues ATM.
Prerequisites
Summary
Document formatting fails on seemingly random pieces of code. Even if diagnostics enabled, there no meaningful errors aside from the extension logging these:
PowerShell Version
Visual Studio Code Version
Extension Version
Steps to Reproduce
The psm1 file failing to be formatted contains >4000 lines of code which execute without a problem. However, I'm unable to locate the appropriate code that might trigger this issue.
Visuals
No response
Logs
u
The text was updated successfully, but these errors were encountered: