[Mono-bugs] [Bug 623723] Gendarme - AvoidCodeDuplicatedInSameClassRule, AvoidCodeDuplicatedInSiblingClassesRule false positives

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Jul 19 21:33:38 EDT 2010


http://bugzilla.novell.com/show_bug.cgi?id=623723

http://bugzilla.novell.com/show_bug.cgi?id=623723#c2


--- Comment #2 from Eric Zeitler <eric.zeitler at gmail.com> 2010-07-20 01:33:38 UTC ---
(In reply to comment #1)
> I'll look at them shortly. However keep in mind that:
> 
> (a) an empty .ctor in source code may not be empty in IL (e.g. initializing
> variables)

This may be the case but what is the recommended solution?  Ignore the rule on
constructors or never initialize variables as they are declared (common
practice)?  I'd think that setting confidence to normal should still have a
good signal-to-noise ratio.

> (b) the rules does not check for duplicate methods - but for duplicated code.
> So X and Y can be quite different (e.g. parameters and return value) but still
> share a block of code that looks to be duplicated (and could be extracted to
> another new, shared, method)

It would be very useful to know the subranges that match so we can find these
places and audit them.  It seems like the threshold for a match is set pretty
loose as looking at the IL there isn't much similarity there either...

> I could very well be unrelated to above cases but those are pretty common :-)

-- 
Configure bugmail: http://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