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
If I pass it a string path to a PSScriptAnalyzerSettings.psd1 file, I get
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Windows.PowerShell.ScriptAnalyzer.Settings.GetHashtableFromHashTableAst(HashtableAst hashTableAst)
at Microsoft.Windows.PowerShell.ScriptAnalyzer.Settings.parseSettingsFile(String settingsFilePath)
at Microsoft.Windows.PowerShell.ScriptAnalyzer.Settings.Create(Object settingsObj, String cwd, IOutputWriter outputWriter, GetResolvedProviderPathFromPSPath`3 getResolvedProviderPathFromPSPathDelegate)
at Microsoft.Windows.PowerShell.ScriptAnalyzer.Commands.InvokeFormatterCommand.BeginProcessing()
If I pass it the parsed settings file with Import-PowerShellDataFile, I get
Invoke-Formatter : Cannot parse settings. Will abort the invocation.
I can confirm the bug and will investigate the root cause and hopefully issue a fix in the next few days and yes, I can confirm, it comes from ExcludeRules = @()
Uh oh!
There was an error while loading. Please reload this page.
If I pass it a string path to a PSScriptAnalyzerSettings.psd1 file, I get
If I pass it the parsed settings file with
Import-PowerShellDataFile
, I getHere's my settings file:
The same happens with
Invoke-ScriptAnalyzer
.The text was updated successfully, but these errors were encountered: