[Mono-bugs] [Bug 665139] New: UseCorrectCasingRule ignores assembly metadata SuppressMessage

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Jan 18 09:06:39 EST 2011


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

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


           Summary: UseCorrectCasingRule ignores assembly metadata
                    SuppressMessage
    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: ---


Created an attachment (id=408831)
 --> (http://bugzilla.novell.com/attachment.cgi?id=408831)
Demonstrates several false positive UseCorrectCasingRules

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

Compiled assembly contains at least the following metadata (as retrieved by
Reflector):

[assembly: SuppressMessage("Microsoft.Naming",
"CA1709:IdentifiersShouldBeCasedCorrectly",
Target="EPS.Data.Linq.Abstractions", Scope="namespace", Justification="EPS is a
proper company name")]
<snip/>

However, Gendarme generates a UseCorrectCasingRule defect.



Reproducible: Always

Steps to Reproduce:
1.Run Gendarme 2.10.x nightly against the attached assembly with ruleset EPS
2.
3.
Actual Results:  
4. UseCorrectCasingRule

Problem: This identifier (namespace, type, or method) violates the .NET naming
conventions.
* Severity: Medium, Confidence: High
* Target:   EPS.Data, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
* Location: EPS.Data.Linq.Abstractions
* Details:  Namespaces longer than two characters should not be all uppercase.
Rename namespace 'EPS' to 'Eps'

Solution: Change the namespace, type, or method name to be pascal-cased (like
MyClass) and parameter names to be camel-cased (like myParameter).
More info available at:
https://github.com/spouliot/gendarme/wiki/Gendarme.Rules.Naming.UseCorrectCasingRule(2.10)

Expected Results:  
No defect

The attached file demonstrates 4 UseCorrectCasingRules that should have been
suppressed.  The suppressions work fine within FxCop.

-- 
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