PowerShell / PowerShell/PSScriptAnalyzer
Windows should not be a plural noun
Open
Nobody has claimed this yet.
Area - Rules
Issue - Enhancement
Up-for-Grabs
- Dominant language
- C#
- Stars
- 2.2k
- Forks
- 414
- Avg merge
- 13h 1m
- Merged PRs (30d)
- 2
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the PSUseSingularNouns warning with the Test-Windows function on the reported PowerShell versions, then trace the PSUseSingularNouns rule in the analyzer. Done means the warning is not emitted for the noun Windows while the rule continues to report genuinely plural nouns.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100