Skip to content
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

Rename public function with a plural nouns to a singular one #1293

Open
mdaneri opened this issue May 3, 2024 · 1 comment
Open

Rename public function with a plural nouns to a singular one #1293

mdaneri opened this issue May 3, 2024 · 1 comment

Comments

@mdaneri
Copy link
Contributor

mdaneri commented May 3, 2024

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
@Badgerati
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

2 participants