andrewrdavidson/PSQualityCheck

PSScriptAnalyzer gives different output on PowerShell 5.1 and 7.1.0

andrewrdavidson opened this issue · 1 comments

Describe the bug
When running PSScriptAnalyzer against code, the module returns different results on PowerShell 5.1 and PowerShell 7.10

To Reproduce
Run the same test on PowerShell 5.1 and 7.1.0 with code that contains functions with plural nouns
On PowerShell 5.1 using PSScriptAnalyzer shows the The cmdlet 'Verb-PluralNoun' uses a plural noun. A singular noun should be used instead error
On PowerShell 7.1.0 using PSScriptAnalyzer the error does not appear

Expected behavior
The output to be the same

PowerShell Version (please complete the following information):

  • OS: Server 2019, Windows 10
  • PowerShell Version: 5.1 and 7.1.0

RuleSets Used (please complete the following information):

  • RuleSet: None

Additional context
This appears to be an issue with PSScriptAnalyzer

This is expected behaviour according to the PSScriptAnalyzer help.

See here https://github.com/PowerShell/PSScriptAnalyzer/blob/master/RuleDocumentation/UseSingularNouns.md

The PSUseSingularNouns rule is not available on PowerShell Core (PowerShell 6 and later)