PowerShell / PSScriptAnalyzer

Download ScriptAnalyzer from PowerShellGallery
https://www.powershellgallery.com/packages/PSScriptAnalyzer/
MIT License
1.85k stars 373 forks source link

Convert UseSingularNouns to configurable rule and add Windows to allowlist #1858

Closed MJVL closed 8 months ago

MJVL commented 1 year ago

PR Summary

This PR:

Relevant test has also been added.

PR Checklist

MJVL commented 1 year ago

I'd be happy to accept it as-is but I am thinking it might be better to expose this allowList as a configurable setting so it can be overridden similar to how we decided to do for this rule when allow-listing az: https://github.com/PowerShell/PSScriptAnalyzer/pull/1846/files#diff-0c1b69454498d51fc5f5ba732f2589578f37357dd80b111e8330fff529036908

I agree, as this could cut down on any future issues asking for additional allowList nouns. I can look into refactoring this as a configurable rule.

For the default value, do you think it would still be proper to include {"Data", "Windows"}, or would it be better practice to leave this blank entirely?

bergmeister commented 1 year ago

Yes, in that case also happy to add Windows to default.

bergmeister commented 9 months ago

Closing and re-opening to re-trigger CI