Skip to content

singular-nouns

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.

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.

Reported
...
function Get-Thing { }
function global:New-Thing { }
function Get-Items { }
function Get-Status { }
function Get-Address { }
function Get-Alias { }
...
powershell:
lint:
rules:
singular-nouns: warn # off (default), warn, error

Enabled by the presets: powershell/psscriptanalyzer.

Suppress one line with sudsy-disable-next-line singular-nouns in a comment of the file’s language.

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.