-
Notifications
You must be signed in to change notification settings - Fork 223
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
Add AutoCorrectAliases setting (PR to be made in VS-Code repo as well) to add support for optionally correcting aliases as well (added in PSSA 1.18.2) #1021
Conversation
…) to add support for optionally correcting aliases as well (added in PSSA 1.18.2)
…rt for optionally correcting aliases as well (added in PSSA 1.18.2). Disabled by default. Requires the following PSES PR to be merged first: PowerShell/PowerShellEditorServices#1021
@PoshChan please retry ci (sporadic failure on ubuntu) |
@bergmeister, you are not authorized to request a rebuild |
@SteveL-MSFT Although I am in the file of authorized poshchan users here, I do not seem to be able to request a retry (see above). Or does the JSON file mean I have only permission to ask to retry as specific test but not the a whole CI build? |
}; | ||
if (AutoCorrectAliases) | ||
{ | ||
ruleConfigurations.Add("PSAvoidUsingCmdletAliases", new Hashtable()); |
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.
The current pattern seems to always include the rule entry and set Enable
to the boolean given. Is there a reason that shouldn't be done here?
Also, does this need to set Enable = true
in the hashtable body?
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.
The PSAvoidUsingCmdletAliases
is a script analysis rule that inherits only from IScriptRule
(see here). Formatting rules typically inherit from ConfigurableRule, which is what makes them have the Enable
property. This is just the API of this specific rule, therefore although it would be nice to have them all consistent, I don't think we could even change that in PSSA without breaking people that use the PSAvoidUsingCmdletAliases
for code analysis in their setting files.
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.
LGTM
…rt for optionally correcting aliases as well (added in PSSA 1.18.2). Disabled by default. (#2165) Requires the following PSES PR to be merged first: PowerShell/PowerShellEditorServices#1021
…rt for optionally correcting aliases as well (added in PSSA 1.18.2). Disabled by default. (PowerShell#2165) Requires the following PSES PR to be merged first: PowerShell/PowerShellEditorServices#1021
…) to add support for optionally correcting aliases as well (added in PSSA 1.18.2) (PowerShell#1021)
…rt for optionally correcting aliases as well (added in PSSA 1.18.2). Disabled by default. (#2165) (#2172) Requires the following PSES PR to be merged first: PowerShell/PowerShellEditorServices#1021
No description provided.