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
{{ message }}
Repository navigation
Module exported variables should not be flagged with PSUseDeclaredVarsMoreThanAssignment #819
Expected: Invoke-ScriptAnalyzer does not flag the variable as unused.
Actual:
file: 'file:MyModule.psm1'
severity: 'Warning'
message: 'The variable 'MyVariable' is assigned but never used. (PSUseDeclaredVarsMoreThanAssignments)'
Dan Travison (@dantraMSFT)
Some things will be rather difficult to do, providing a partial solution should be doable, but something like the following might not be possible via inspection (given the following m.psm1 file)
Activity
JamesWTruher commentedon Jan 26, 2018
Dan Travison (@dantraMSFT)
Some things will be rather difficult to do, providing a partial solution should be doable, but something like the following might not be possible via inspection (given the following m.psm1 file)
It would be quite difficult to catch that via the ast since it means getting a runtime value, would a partial solution be better than no solution?