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
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 ()
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
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
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
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.
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 {
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!
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
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