-
Notifications
You must be signed in to change notification settings - Fork 385
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
Fix errors in ShouldProcess rule document #1766
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thank you for the effort and very detailed description 🥳
@sdwheeler I am happy from a technical perspective, do you want to review the docs change as well before merging?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor change to link to about_* topics.
Updated as suggested. Would you review it again and resolve the request? I cannot find any way to resolve this thread by myself. |
@sdwheeler Can you re-review please? You can contact @JamesWTruher to get it merged as the left-over check doesn't seem to go away when pulling in master. |
Thanks @sdwheeler, can you resolve the merge conflict please and then we are good to merge 💪🏻 |
PR Summary
Write-Host
from the correct example. It is duplicated with outputs of-WhatIf
or-Confirm
. It also violates "Avoid Using Write-Host" rule.ShouldProcess
rule as mentioned inShouldProcess.md
.Get-ScriptAnalyzerRule -Name PSShouldProcess | % Severity
also returns "Warning" with ScriptAnalyzer 1.20.0PR Checklist
Make sure all.cs
,.ps1
and.psm1
files have the correct copyright headerMake sure you've added a new test if existing tests do not effectively test the code changed and/or updated documentationWIP:
to the beginning of the title and remove the prefix when the PR is ready.Script Analyzer 1.20.0 detects aFor some reason, Script Analyzer 1.20.0 doesn't detect anyShouldProcess
violation in the updated wrong example.ShouldProcess
violation in the updated wrong example.