[1392 total ]
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]

Re: [gendarme] MonoCompatibilityReviewRule

Your MoMA definitions could be (much) older than the version of Mono you
are currently using. What version of Gendarme are you using ?
Gendarme 2.6 (preview) should try to download newer definitions (if used
with older MoMA ... [More] definitions). Do a "man gendarme" and find where the
definitions are kept, then delete (or move) them. That should force the [Less]

BadRecursiveInvocationRule

This may be bad style but it is not what the error is reported to be
I have essentially
public Foo Foo
{
get
{
return Bar <Foo>.DoStuff (FOO);
}
FOO is a constant
Foo is a type
Foo is also a property name
There is no recursion.

MonoCompatibilityReviewRule

I got the following critical error
Severity: Critical Confidence: Normal
Source: /home/vgiszpenc/trunk/Net/Host Set.cs(≈547)
Details: System.String System.Net.Sockets.SocketExcep tion::get_Message
() is missing from Mono.
But SocketException inherits from Exception which defines
public virtual string Message {

AvoidFloatingPointEqualityRule

My code got flagged for doing what is suggested. What is wrong with
the following code?
return (Math.Abs(definitionValue - actualValue) < float.Epsilon);
P.S. Any chance on bringing the MonoDevelop Add-in up to date?
Thanks!

Re: Support for .NET 4.0 (VS2010 Beta)

Hello Tuomas,
The issue is inside Cecil. The root problem is that Gendarme, like
most Cecil tools, can work on assemblies compiled with another version
of the framework/runtime (e.g. Mono, Silverlight...) and, while a nice ... [More]
feature, it needs some hacks to find where the FX assemblies (for the
analyzed assemblies) are located. [Less]

Support for .NET 4.0 (VS2010 Beta)

I tried to use Gendarme with .NET 4.0 dll and got:
Stack trace: System.NotSupportedException: Version not supported:
4.0.0.0
at Mono.Cecil.BaseAssemblyResolve r.GetCorlib(AssemblyNameRefere nce
reference)
at ... [More] Mono.Cecil.BaseAssemblyResolve r.Resolve(AssemblyNameReferenc e
name)
at Gendarme.Framework.AssemblyRes olver.Resolve [Less]