General
16 January 2008

An interesting post of David DeWinter showing how difficult it is to use FxCop/VSTS Code Analysis when PostSharp is enabled. Indeed, PostSharp does not respect all FxCop rules, and does not emit rule-disabling custom attributes.

David shows how to run FxCop before PostSharp, which involves some serious changes in MSBuild files.

Seems like a worry for the next version of PostSharp...

Comments

David DeWinter

David DeWinter

Hi Gael,

I just recently stumbled across your blog and found that you referenced my post. You say that this could be a worry for the next version of PostSharp; is it something you will be looking into for the next version of PostSharp?

Perhaps there is a way for PostSharp to emit an intermediate assembly that serves as the target of Code Analysis. That would definitely help those individuals using FxCop instead of VS to perform code analysis.

Regards,
David DeWinter

P.S. The actual link to the blog entry is here: http://blogs.rev-net.com/ddewinter/?p=30
Gael Fraiteur

Gael Fraiteur

Hi David,

I have filed (myself) a 'feature request' in the issue tracker and it will be in the current release (1.0).

I will at least put the [CompilerGenerated] custom attribute on all stuff generated by Laos, so static analyzers are supposed to ignore it.

So it is for very soon!

Gael
David DeWinter

David DeWinter

Even better! Good luck!

David
Comments are closed