PSScriptAnalyzer icon indicating copy to clipboard operation
PSScriptAnalyzer copied to clipboard

Make Settings type detection more robust

Open Tadas opened this issue 2 years ago • 1 comments

PR Summary

It was unable to parse settings hashtable, when that hashtable has been wrapped as a PSObject. This started happening in PS 7.2, I was using Import-PowerShellDataFile to read some settings before passing them on to Invoke-ScriptAnalyzer.

There was some code to handle wrapped strings, might as well do that with all parameter types.

PR Checklist

Tadas avatar Feb 16 '24 14:02 Tadas

Related to #807 but that particular scenario was being covered.

Tadas avatar Feb 16 '24 15:02 Tadas