https://bugzilla.novell.com/show_bug.cgi?id=667418
https://bugzilla.novell.com/show_bug.cgi?id=667418#c0 Summary: CheckParametersNullityInVisibleMethodsRule fix leads to AvoidCodeDuplicatedInSameClassRule break in VB Classification: Mono Product: Mono: Tools Version: 2.8.x Platform: 64bit OS/Version: Windows XP Status: NEW Severity: Normal Priority: P5 - None Component: Gendarme AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- Created an attachment (id=410598) --> (http://bugzilla.novell.com/attachment.cgi?id=410598) Zip file containing two dlls as examples. One compiled with "/o" optimization flag, and one without. User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 (.NET CLR 3.5.30729) Entering this bug per the conversation on the Google Group (see: https://groups.google.com/d/topic/gendarme/__mJdYJN8no/discussion). When I fix the "CheckParametersNullityInVisibleMethodsRule" for two public methods in the same class, those methods are then flagged for violating the "AvoidCodeDuplicatedInSameClassRule" despite not being flagged for violating it before. I have a class with two public methods. When I run Gendarme, it correctly flags them for violating the "CheckParametersNullityInVisibleMethodsRule". I fix the methods by adding a test at the beginning of the method like so: If IsNothing(param) Then Throw New ArgumentNullException("param") End If When I add this for both, I no longer see the "CheckParametersNullityInVisibleMethodsRule", however both methods are flagged as violating the "AvoidCodeDuplicatedInSameClassRule" Reproducible: Always Steps to Reproduce: 1.Have a class with a two public methods that takes parameters 2.Add the code below to each method to check for null parameters If IsNothing(param) Then Throw New ArgumentNullException("param") End If Actual Results: Flagged for violating the "AvoidCodeDuplicatedInSameClassRule" Expected Results: It should pass both rules. -- 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. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
