[Mono-bugs] [Bug 672174] New: UseSingularNameInEnumsUnlessAreFlags generates false positive on singular terms ending in 's' like Status

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Feb 15 12:12:38 EST 2011


https://bugzilla.novell.com/show_bug.cgi?id=672174

https://bugzilla.novell.com/show_bug.cgi?id=672174#c0


           Summary: UseSingularNameInEnumsUnlessAreFlags generates false
                    positive on singular terms ending in 's' like Status
    Classification: Mono
           Product: Mono: Tools
           Version: 2.10.x
          Platform: 64bit
        OS/Version: Windows 7
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Gendarme
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: ethan_j_brown at hotmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US)
AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.18 Safari/534.16

Create an Enum like

enum Status
{
One,
Two
}

I didn't look at the code for the rule, but I presume it uses the letter 's' to
determine if a word is plural.

Test case published here:
https://github.com/Iristyle/mono-tools/commit/f71d893a08b0493b4d54b7a5a595ba2a6d714d32

Reproducible: Always

Steps to Reproduce:
1.Write code like above - run Gendarme.
2.
3.
Actual Results:  
Violation of rule.

Expected Results:  
No violation.

Hanselman recently covered noun pluralization in a blog post here:
http://www.hanselman.com/blog/FunWithNounPluralizationLibrariesAndTheNETFramework.aspx

And there is some simple / dated code available here:
http://blogs.msdn.com/b/dmitryr/archive/2007/01/11/simple-english-noun-pluralizer-in-c.aspx

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list