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
Today when I run Invoke-ScriptAnalyzer against my DoPx module, 5 informational messages are generated for the PSProvideCommentHelp rule indicating that I should provide comment-based help for the 5 functions that were discovered by this rule. Those are false positives, because the 5 functions in question are internal to my module, not exposed externally at all, and therefore they do not need comment-based help.
This issue raises another limitation with Invoke-ScriptAnalyzer: today it is written specifically for paths. It should have a parameter set that is for modules, so that you can just pass it a module name and have it analyze the entire module. This is important for a few obvious reasons:
modules have their own criteria when it comes to many rules like this one
modules have need for rules that are specific to them
With that in mind, the following changes should be made:
A parameter set should be added to Invoke-ScriptAnalyzer that takes a ModuleInfo parameter (with pipeline input by value) so that you can invoke Get-Module ... | Invoke-ScriptAnalyzer to run it against a module.
A ModuleName parameter set should be added to allow users to invoke Invoke-ScriptAnalyzer -ModuleName ....
The PSProvideCommentHelp rule should not generate messages against functions that are not exported from a module.
The text was updated successfully, but these errors were encountered:
Today when I run Invoke-ScriptAnalyzer against my DoPx module, 5 informational messages are generated for the PSProvideCommentHelp rule indicating that I should provide comment-based help for the 5 functions that were discovered by this rule. Those are false positives, because the 5 functions in question are internal to my module, not exposed externally at all, and therefore they do not need comment-based help.
This issue raises another limitation with Invoke-ScriptAnalyzer: today it is written specifically for paths. It should have a parameter set that is for modules, so that you can just pass it a module name and have it analyze the entire module. This is important for a few obvious reasons:
With that in mind, the following changes should be made:
The text was updated successfully, but these errors were encountered: