Skip to content

Commit 36cb31f

Browse files
committed
Merge pull request #220 from PowerShell/SingularNouns
Add check for both IsPlural and IsSingular for nouns
2 parents d69fe7f + ef0db7f commit 36cb31f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Rules/UseSingularNouns.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public IEnumerable<DiagnosticRecord> AnalyzeScript(Ast ast, string fileName) {
4949
String noun = funcNamePieces[1];
5050
var ps = System.Data.Entity.Design.PluralizationServices.PluralizationService.CreateService(CultureInfo.GetCultureInfo("en-us"));
5151

52-
if (!ps.IsSingular(noun))
52+
if (!ps.IsSingular(noun) && ps.IsPlural(noun))
5353
{
5454
yield return new DiagnosticRecord(string.Format(CultureInfo.CurrentCulture, Strings.UseSingularNounsError, funcAst.Name),
5555
funcAst.Extent, GetName(), DiagnosticSeverity.Warning, fileName);

0 commit comments

Comments
 (0)