Steps to reproduce
param (
[string[]]$aszServers = @()
[string]$fServerListFile = ""
)
Expected behaviour
Invoke-ScriptAnalyzer should report a parser-related error because the parameter list is malformed (missing comma between parameters).
Actual behaviour
PowerShell detects the syntax error:
> .\Broken.ps1
At line:2 char:29
+ [string[]]$aszServers = @()
+ ~
Missing ')' in function parameter list.
However:
> Invoke-ScriptAnalyzer .\Broken.ps1 -Severity Error
returns nothing.
Environment data
$PSVersionTable
Name Value
---- -----
PSVersion 5.1.26100.8655
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.26100.8655
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
PSScriptAnalyzer: 1.25.0
Reactions are currently unavailable
Steps to reproduce
Expected behaviour
Invoke-ScriptAnalyzer should report a parser-related error because the parameter list is malformed (missing comma between parameters).
Actual behaviour
PowerShell detects the syntax error:
However:
returns nothing.
Environment data
$PSVersionTable Name Value ---- ----- PSVersion 5.1.26100.8655 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.26100.8655 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 PSScriptAnalyzer: 1.25.0