We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
save-module -Name xWebAdministration -Version 1.20.0.0 -Path . Invoke-ScriptAnalyzer .
some warnings if warranted
Numerous errors, including the NullReferenceException below: writeErrorStream : True PSMessageDetails : Exception : System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules.UseIdenticalMandatoryPa rametersDSC.GetKeys(String fileName) at Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules.UseIdenticalMandatoryPa rametersDSC.<AnalyzeDSCResource>d__7.MoveNext() at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) at Microsoft.Windows.PowerShell.ScriptAnalyzer.ScriptAnalyzer.AnalyzeSyntaxTree(Scr iptBlockAst scriptAst, Token[] scriptTokens, String filePath) TargetObject : C:\temp\testpackages\xWebAdministration\1.20.0.0\DSCResources\MSFT_xWebsite\MSFT_xWebs ite.psm1 CategoryInfo : InvalidOperation: (C:\temp\testpac...T_xWebsite.psm1:String) [Invoke-ScriptAnalyzer], NullReferenceException FullyQualifiedErrorId : RULE_ERROR,Microsoft.Windows.PowerShell.ScriptAnalyzer.Commands.InvokeScriptAnalyzerCo mmand ErrorDetails : InvocationInfo : System.Management.Automation.InvocationInfo ScriptStackTrace : at <ScriptBlock>, <No file>: line 1 PipelineIterationInfo : {0, 1} writeErrorStream : True PSMessageDetails : Exception : System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules.UseIdenticalMandatoryPa rametersDSC.GetKeys(String fileName) at Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules.UseIdenticalMandatoryPa rametersDSC.<AnalyzeDSCResource>d__7.MoveNext() at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) at Microsoft.Windows.PowerShell.ScriptAnalyzer.ScriptAnalyzer.AnalyzeSyntaxTree(Scr iptBlockAst scriptAst, Token[] scriptTokens, String filePath) TargetObject : C:\temp\testpackages\xWebAdministration\1.20.0.0\DSCResources\MSFT_xWebApplication\MSF T_xWebApplication.psm1 CategoryInfo : InvalidOperation: (C:\temp\testpac...pplication.psm1:String) [Invoke-ScriptAnalyzer], NullReferenceException FullyQualifiedErrorId : RULE_ERROR,Microsoft.Windows.PowerShell.ScriptAnalyzer.Commands.InvokeScriptAnalyzerCo mmand ErrorDetails : InvocationInfo : System.Management.Automation.InvocationInfo ScriptStackTrace : at <ScriptBlock>, <No file>: line 1 PipelineIterationInfo : {0, 1}
> $PSVersionTable Name Value ---- ----- PSVersion 5.1.16299.251 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.16299.251 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 > (Get-Module -ListAvailable PSScriptAnalyzer).Version | ForEach-Object { $_.ToString() } 1.16.1
The text was updated successfully, but these errors were encountered:
I can confirm this still happens on the latest version of development. The more minimal repro is:
development
save-module -Name xWebAdministration -RequiredVersion 1.20.0.0 -Path . $results = Invoke-ScriptAnalyzer -Path .\xWebAdministration\1.20.0.0\DSCResources\MSFT_xWebApplication
Here is the snapshot inside the debugger:
Sorry, something went wrong.
bergmeister
Successfully merging a pull request may close this issue.
Steps to reproduce
Expected behavior
Actual behavior
Environment data
The text was updated successfully, but these errors were encountered: