-
Notifications
You must be signed in to change notification settings - Fork 1
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
PSReviewUnusedParameter in-place suppression instead of disabling the rule (OSOE-528) #18
Comments
Shouldn't we instead wait for the bug to be fixed? In your PRs I see only suppressions, but no change due to the rule finding an issue. So, while it may catch issues in the future, apparently we don't have those frequently, and now it only necessitates suppressing false alarms. |
The issue has been open for 2 and a half years, so why should we wait more? |
This rule currently brings more suppressions than fixes. So I don't see why we'd use it, especially since the bugs it guards against are minor. |
@DAud-IcI please see this discussion. |
Ah, I reviewed this a few hours earlier but then took a nap because the merging seemed complex. Shouldn't have slacked if I knew it leaves time for discussion. 😁 |
The
PSReviewUnusedParameter
is disabled in our current configuration, because it produces false positives when a parameter is only used in a local function, but not in the main script body. See PowerShell/PSScriptAnalyzer#1472.A recent comment (PowerShell/PSScriptAnalyzer#1472 (comment)) tipped me off to try suppressing those cases in-place, so we can re-enable the rule.
Jira issue
The text was updated successfully, but these errors were encountered: