singular-nouns
What it does
Section titled “What it does”Reports a function named Verb-Nouns whose noun ends in s. A noun that ends in ss, us, is or as (Status, Address, Analysis, Alias) is not reported.
Why it matters
Section titled “Why it matters”The Microsoft guidelines name the noun in the singular, even when the command returns many objects, so that users can guess names and the names look the same in every module.
To fix, use the singular noun.
Example
Section titled “Example”...function Get-Thing { }function global:New-Thing { }function Get-Items { }function Get-Status { }function Get-Address { }function Get-Alias { }...Configuration
Section titled “Configuration”powershell: lint: rules: singular-nouns: warn # off (default), warn, errorEnabled by the presets: powershell/psscriptanalyzer.
Suppress one line with sudsy-disable-next-line singular-nouns 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 | PSUseSingularNouns |
partial | The module asks an English pluralizer; Sudsy takes a noun ending in s as plural unless it ends in ss, us, is, as or is News, Series, Species, Data. |