approved-verbs
What it does
Section titled “What it does”Reports a function named Verb-Noun whose verb is not one that Get-Verb returns. A name without a dash is not checked.
Why it matters
Section titled “Why it matters”PowerShell users find commands by verb (Get-Command -Verb Get) and expect a verb to mean the same in every module. An unapproved verb such as Make- or Delete- also makes Import-Module print a warning about the module’s names.
To fix, rename the function with an approved verb (New-, Remove-).
Example
Section titled “Example”function Fetch-Data { param(...}function Get-Thing { }function Fetch { }function global:Make-Thing { }...Configuration
Section titled “Configuration”powershell: lint: rules: approved-verbs: warn # off (default), warn, errorEnabled by the presets: powershell/psscriptanalyzer.
Suppress one line with sudsy-disable-next-line approved-verbs in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools. full: Sudsy reports what the upstream rule reports; partial: only part of it, as the last column says.
| Tool | Rule | Match | What differs |
|---|---|---|---|
| psscriptanalyzer | PSUseApprovedVerbs |
partial | Names without a dash are not checked; the verb list is fixed and cannot follow the host. |