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
When attempting to write a custom PSScriptAnalyzer rule, the IScriptExtent.Fileproperty is null in the Problems pane of VS Code, but is not null not outside of the VS Code Problems pane.
When attempting to write a custom
PSScriptAnalyzer
rule, theIScriptExtent.File
property is null in the Problems pane of VS Code, but is not null not outside of the VS Code Problems pane.Steps to reproduce
In VS Code, open
scriptWithViolations.ps1
, then open the Problems pane (Ctrl + Shift + M
).Expected behavior
$ast.Extent.File
is populated with the absolute path of the script filescriptWithViolations.ps1
, the same as the output fromInvoke-ScriptAnalyzer
Actual behavior
Invoke-ScriptAnalyzer
returns:while VS Code's Problems pane shows
$ast.Extent.File
as$null
$ast.Extent.File =
If an unexpected error was thrown, then please report the full error details using e.g.
$error[0] | Select-Object *
Environment data
The text was updated successfully, but these errors were encountered: