Gendarme vs FxCop

Gendarme and FxCop look very similar and seem to solve the same problem. What would you suggest for a small group of developers (3-5) mostly working on a web application with a lot of business logic? Why?

+3


source to share


2 answers


The Gendarme is truly the mono equivalent of FxCop. Given that Microsoft plans to ship a significant set of code analysis rules in most versions of the next Visual Studio, you can use FxCop and stick with it. The integrated version of FxCop (called Code Analysis) is the easiest to use if your version of Visual Studio supports it (Visual Studio 2010 Premium and Ultimate).

There is a Visual Studio add-in that allows you to run FxCop inside Visual Studio Professional . You need to download FxCop 10 separately ( part of the Windows Platform SDK ). Please note that the integrated version of Visual Studio comes with several additional rules , so the output may vary.

Since Gendarme does not integrate directly into Visual Studio ( although you can make it part of the build process ) and you won't see many people using Visual Studio use Gendarme. Mainly because he is not well known.



In the end I will be using FxCop from a comfortable point of view. It's integrated into the default version of Visual Studio that I use and is well known in the developer community.

But if you're not using Visual Studio Premium or Ultimate, you can choose either or even both. Just keep in mind that if you choose both, you are likely to get multiple duplicate messages or even conflicting messages, as the creators of these different tools will not always agree.

If you don't mind investing, then, as Niaher suggests, Resharper or Coderush are very useful add-ons (I wouldn't call them a replacement since they don't work outside of the IDE (like in a continuous integration assembly)) as they provide a straight forward feedback when writing code. Often without even compiling it. And they often provide the ability to "apply the fix" without thinking about what to do.

+9


source


An alternative or a good addition to FxCop / gendarme would be to use the commercial tool NDepend . With this tool, you can write a code rule over LINQ queries (namely CQLinq) . Disclaimer: I am one of the developers of this tool

Over 200 code rules are offered by default , including design, architecture, code quality, code evolution, naming conventions, dead code, .NET Fx usage ...

CQLinq is for writing coding rules that can be checked live in Visual Studio or can be checked during the build process and reported in an HTML / javascript report .



The strength of CQLinq over FxCop or the gendarme is that it is easy to write a code rule and get immediate results. Provides a means to view the consistent code points. Specifically, it looks like this:

CQLinq code rule

+8


source







All Articles