-
Notifications
You must be signed in to change notification settings - Fork 395
Invoke-ScriptAnalyzer throws error #828
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Does not repro for me using the latest version |
No longer repros for me either |
Ok. Thanks. Could you otherwise try it on the file in which it was originally? I would be happy to look into it even if it's quite a long script since I recently opened a new PR that allows me to attach the Debugger in VS to it very easily. |
I just tried to repro this issue more intensively. I ran combinations of
The error case is only when PSScriptAnalyzerSettings.psd1 is defined and the snippet is in a file. The associated PSScriptAnalyzerSettings.psd1 is here |
Sorry, it still does not repro for me using your settings file Invoke-ScriptAnalyzer -Path .\script.ps1 -Settings (get-content .\PSScriptAnalyzerSettings.psd1) I have tried with and without |
Can you try explicitly testing |
Aha. I found that I can reproduce now with |
PSScriptAnalyzer throws an error "Object reference not set to an instance of an object" when analyzing the hash literal in the following line.
$MyObj | % { @{$_.Name = $_.Value} }
The text was updated successfully, but these errors were encountered: