Pode icon indicating copy to clipboard operation
Pode copied to clipboard

Rename public function with a plural nouns to a singular one

Open mdaneri opened this issue 9 months ago • 1 comments

PowerShell best practices state cmdlets should use singular nouns and not plurals. Suppression allows you to suppress the rule for specific function names. For compatibility, an Alias with the old name will be created.

Functions

  • Test-PodeAccessExists -> Test-PoseAccess
  • Test-PodeAuthExists -> Test-PodeAuth
  • Clear-PodeSchedules -> Clear-PodeSchedule
  • Use-PodeSchedules -> Use-PodeSchedule
  • Clear-PodeTimers -> Clear-PodeTimer
  • Use-PodeTimers -> Use-PodeTimer
  • Merge-PodeScriptblockArguments -> Merge-PodeScriptblockArgument

mdaneri avatar May 03 '24 20:05 mdaneri

Test-PodeAccess and Test-PodeAuth already exist as functions. Maybe something like Test-PodeAccessPresent or Test-PodeAccessCreated / Test-PodeAccessAdded?

IMO, these functions are valid use cases of plural names, as the Clear ones really are doing multiple things ad they can't be singularised - Clear-PodeTimers will clear all timers out regardless and Clear-PodeTimer will be confusing.

I'll agree on the Merge-PodeScriptblockArgument and Use- ones though, those could be changed.

Badgerati avatar May 09 '24 08:05 Badgerati