-
Notifications
You must be signed in to change notification settings - Fork 237
Provide quickfix functionality #304
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
Conversation
Hi @kapilmb, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
TTYL, MSBOT; |
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.
Cool! See the one comment below about the rules. Otherwise, I look forward to seeing this in action!
"PSReservedCmdletChar", | ||
"PSReservedParams", | ||
"PSShouldProcess", | ||
"PSMissingModuleManifestField", | ||
"PSAvoidDefaultValueSwitchParameter", | ||
"PSUseDeclaredVarsMoreThanAssigments", | ||
"PSMisleadingBacktick", | ||
"PSUseDeclaredVarsMoreThanAssigments" |
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.
We should test the new rule additions. We got a lot of blow-back from the community early on because of lots of green squiggles in folks' scripts. Also, we should add a note in the comments for this section, that any updates here should be also made in the https://github.com/PowerShell/vscode-powershell/blob/master/examples/PSScriptAnalyzerSettings.psd1 file as well.
BTW it is more palatable for folks when the green squiggles underline just the bare minimum of the script as opposed to say entire functions. :-) BTW that also helps with not having "overlapping" script extents for multiple rule violations.
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.
I was testing PSUseDeclaredVarsMoreThanAssigments
so I added it there and forgot to remove it. The rule is still a bit noisy and I would rather remove it. Thanks for catching it.
@kapilmb Sorry, I wasn't reffering to |
@rkeithhill Yes, you are right. The extents of "PSUseToExportFieldsInManifest", # provides quickfix
"PSMisleadingBacktick", # provides quickfix
"PSAvoidUsingCmdletAliases", # provides quickfix
"PSUseApprovedVerbs",
"PSAvoidUsingPlainTextForPassword", # provides quickfix
"PSReservedCmdletChar",
"PSReservedParams",
"PSShouldProcess",
"PSMissingModuleManifestField",
"PSAvoidDefaultValueSwitchParameter",
"PSUseDeclaredVarsMoreThanAssigments" One thing I would like to note is that the quickfix scenario will not work until the next release of PSSA (which should be soon.) |
2ab1de4
to
1d2d45e
Compare
@rkeithhill I have reverted the "rule removal" changes. |
I didn't notice the addition of |
1d2d45e
to
24a34c1
Compare
@daviwil rebased on develop branch. |
Thanks a lot Kapil! |
No description provided.