[1433 total ]
Re: NullReferenceException

Hi,
On 26 Nov., 14:35, Sebastien Pouliot <sebastien.poul...@gmail.com>
wrote:
AFAICs, we don't use p/Invoke anywhere in this dll, but I'm sure that
we use abstract methods.
So you think that the foreach uses a method from an abstract type
which is only actually implemented in subclasses. I'll try to extract

Re: [gendarme] Re: NullReferenceException

A quick guess: could this type has abstract (or pinvoke) methods ?
In particular methods like Equals, CompareTo, operators, Clone and
GetHashCode.
I think the NRE comes from:
foreach (Instruction ins in method.Body.Instructions) {
when a method is found without a body (hence the abstract/pinvoke

Re: [gendarme] NullReferenceException

Hello Markus,
Could you try the gendarme console runner ? i.e. gendarme.exe in a
console window. This should give us a few more details including, iirc,
the method where the NRE occurred.
If you can identity the method then it should be simple to extract a
test case (without disclosing the DLL or the IP within).

Re: NullReferenceException

Hi,
[...]
Additional information: Running GendarmeWizard in Mono seems to freeze
the UI without any interaction after finding of 90 problems. Running
gendarme from command line via mono (Mono 2.4 on the same windows
vista) ... [More] produces the following output:
C:\Program Files (x86)\Novell\Gendarme>gendarme c:\Path\to\MyDll.dll [Less]

NullReferenceException

Hello,
We're currently experimenting with Code Analysis tools, and I tried
Gendarme on one of our DLLs (proprietary code, so I'm not sure whether
I get permission to disclose that dll). I Installed the Gendarme
Package and started ... [More] the "wizard" via start menu, using Vista64.
After some seconds of analyzing, Gendarme seems to get a [Less]

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'.