PSScriptAnalyzer icon indicating copy to clipboard operation
PSScriptAnalyzer copied to clipboard

Windows should not be a plural noun

Open kilasuit opened this issue 4 years ago • 1 comments

Before submitting a bug report:

  • Make sure you are able to repro it on the latest released version
  • Perform a quick search for existing issues to check if this bug has already been reported

Steps to reproduce

See this tweet https://twitter.com/FrankLesniak/status/1453189852032344064?s=20

function Test-Windows {
dostuff
}

Expected behavior

PSUseSingularNouns warning is not thrown when noun finishes with Windows

Actual behavior

PSUseSingularNouns warning thrown

If an unexpected error was thrown then please report the full error details using e.g. $error[0] | Select-Object *

Environment data



Name                           Value
----                           -----
PSVersion                      7.2.0-preview.10
PSEdition                      Core
GitCommitId                    7.2.0-preview.10
OS                             Microsoft Windows 10.0.19043
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0



1.18.3 - Doesn't throw
1.20.0 - Does throw

kilasuit avatar Oct 27 '21 11:10 kilasuit

Consider adding it here: https://github.com/PowerShell/PSScriptAnalyzer/blob/5ba71a92ad8854d3281ea28593253cc108d69e32/Rules/UseSingularNouns.cs#L38-L41

rjmholt avatar Oct 27 '21 20:10 rjmholt