You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a few functions that end with "Data", such as Add-ScriptMethodData, Add-AliasPropertyData, and Add-ScriptPropertyData. These three commands trip the PSUseSingularNoun warning. Technically Data is plural and Datum is singular, however in practice I doubt hardly anyone would ever use, or look for, Datum. PowerShell ships with Update-FormatData and Update-TypeData. With this in mind, can "Data" be added as an automatic exception to this rule so that commands ending with Data don't trigger it?
The text was updated successfully, but these errors were encountered:
The team agreed that this should be an exception to the rule, but we'd really like for there to be a standard way to define this sort of whitelist in a more general way than hard-coding the logic into each rule.
Of course, this gets back to the need for passing some kind of user data to rules (like for the PSAvoidUsingCmdletAliases rule). We've floated a few designs internally, but I still haven't gotten around to opening an issue for everyone to review (it got deprioritized in favor of auto-correction in VS Code).
If you think it's critical, Kirk, we could of course hardcode this one, but I'd like to move away from doing that as much as possible until we have a general design.
It's definitely not critical for me...I can ignore the rule for now (and it may go away for my module anyway because I'm considering replacing those commands with a dll for better performance anyway). I agree that hardcoding the exceptions to the rule one at a time isn't the right way to go, so figure out the right way to do it and fix it then.
I have a few functions that end with "Data", such as Add-ScriptMethodData, Add-AliasPropertyData, and Add-ScriptPropertyData. These three commands trip the PSUseSingularNoun warning. Technically Data is plural and Datum is singular, however in practice I doubt hardly anyone would ever use, or look for, Datum. PowerShell ships with Update-FormatData and Update-TypeData. With this in mind, can "Data" be added as an automatic exception to this rule so that commands ending with Data don't trigger it?
The text was updated successfully, but these errors were encountered: