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.
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.
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.
…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.