[1398 total ]
Re: [gendarme] Re: Review request for new rule: DelegatesPassedToNativeCodeMustIncludeExceptionHandlingRule

On Tue, Feb 17, 2009 at 10:26 AM, Rolf Bjarne Kvinge
Actually a stfld to 'this' is not necessarily safe, it depends on how
the method was called - callvirt does a nullcheck when calling, while
call doesn't (VB and C# compilers will always insert a callvirt when
an instance method is called, so this isn't necessarily true. This

Re: [gendarme] Re: Review request for new rule: DelegatesPassedToNativeCodeMustIncludeExceptionHandlingRule

Hi Sebastien
My time to say sorry for the delay now ;-)
The wiki has history, so this wasn't a problem.
At the time I was fooled by the fact that nothing was written to the
console, now that I've found the html report I have fixed ... [More] most of the
issues which are reported, except for:
AvoidLackOfCohesionOfMethodsRu le : Type cohesiveness : 31%. I don't [Less]

Re: UsePreferredTermsRule - Cant Can't Cannot

Yep this is a problem - sadly solving it introduce new ones, e.g.
CANT. The rule checks for 'terms' not the "correct" casing (i.e. it
does not know about other, standard or custom, rule that check for
casing). I added a note to review this [1] - we should at least be
able to reduce the confidence level in most cases.

Re: Shared code analysis annotations

Hello Steve,
Thanks :)
Right. The current code only deals with a "method-by-method" basis.
A common set would be nice. However I'm putting my (personal ;-) faith
in code contracts.
I'm not a Resharper user, actually ... [More] I don't know if any Gendarme hacker
that use it (maybe JB?) or how many Gendarme users, so it's a bit hard [Less]

UsePreferredTermsRule - Cant Can't Cannot

Hi,
I've got this rule:
Target: System.Boolean Foo.MessageStatus::CanTransiti onTo
(Foo.MessageStatus)
Assembly: Foo, Version=1.0.1.0, Culture=neutral, PublicKeyToken=null
Severity: Medium Confidence: High
Source: C:\Foo\MessageStatus.cs(≈63)
Details: Term 'Cant' should be replaced with 'Cannot'.

Shared code analysis annotations

Hi,
Love Gendarme, great work!
I've found that it's giving me false positives, epecially for the rule
'CheckParametersNullityInVisib leMethodsRule'.
To be fair, Gendarme is correct in what it's reporting as I wrap 'if
(arg==null) throw .... in a wrapper. e.g.
public XmlWrapper(XNode xml)

Re: [gendarme] ignoring false positives

At some point we'll support the [SuppressMessage] attribute that MS use
to ignore defects with FxCop. About 50% of the code is already there.
In the mean time the solution (which, personally, I much prefer to using
attributes) is to ... [More] use an ignore file, see example in [1], docs in [2].
For 2.8 I plan to write a tool to convert defects into ignore entries. [Less]

ignoring false positives

Hi,
If I would like a rule to execute, but I know that it incorrectly
makes a finding for a given method.
Is there a way for me to decorate the method with some attribute
(example follows)?
[IgnoreGendarmeRule(EnsureLoca lDisposableRule] // foo is Disposed
elsewhere in method Bar ()
void DoStuff ()

Re: [gendarme] AvoidFloatingPointEqualityRule

The solution is a bit more complex than that and the rule documentation
is updated for 2.6 (but not yet on the wiki). I don't recall the rule
source enough to see why it fails... I'll check that up later (likely
next weekend).
Not ... [More] that opening a bug report (on bugzilla.novell.com) is a good way to
make sure I won't forget about it :) [Less]

Re: [gendarme] BadRecursiveInvocationRule

a) Gendarme version ?
b) under Mono (version ?) or MS.NET ?
c) can you give me a compilable sample (to be sure I'm testing the exact
same thing as you are) ?
Right now I suspect an (old) metadata/generic bug on Mono. That makes ... [More]
comparing types/methods using generic more likely to fail. But it could
be something else too... [Less]