tags:

views:

113

answers:

2

My team is using FxCop to help clean up an existing ASP.NET application.

We have noticed some strange behavior in the way FxCop counts warnings.

It seems that on one pass through the code, FxCop only finds and counts the first warning related to a specific rule in each method.

So, if I have:

public test3(){
   int a = 0; //DoNotInitializeUnecessarily
   int b = 0; //DoNotInitializeUnecessarily
}

...my FxCop report will only find and count the first warning of type DoNotInitializeUnecessarily in method test3(). Is there any way to make FxCop find and count both instances of this problem in method test3()?

The current method of counting is problematic for us, because FxCop is under reporting the number of warnings. This makes it difficult to estimate how much time will be required to fix existing FxCop warnings, since we don't actually know how many are in the application.

+2  A: 

Did you try changing Tools->Settings->Project Defaults->"Disable rules after [ 1] exceptions" ?

EricSchaefer
A: 

Hi Eric,

I'll give that setting a try and get back to you.

Tex