PSScriptAnalyzer is not working in my Visual Studio Code
Asked Answered
D

1

6

I have it enable in settings (Script Analysis: Enable).

I have settings path sets to ScriptAnalyzerSettings.psd1

I can invoke Get-ScriptAnalyzerRule or Invoke-ScriptAnalyzer in PowerShell Integrated Console and it works (and showing warnings/errors according to rules).

On the other hand after "F1 + PowerShell: Select PSScriptAnalyzer Rules" nothing happens. And of course there are no highlights in code.

Divulgence answered 5/4, 2020 at 11:2 Comment(1)
Please consider marking one of the answers as the solution to your question.Somatist
D
1

Reinstalling PowerShell extension helped in my case. Also, I've observed that for the extension to work, you have to have PowerShell Integrated Console running in the background.

Dedal answered 14/6, 2022 at 13:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.