views:

501

answers:

6

Does anyone know of an equivalent to FxCop/StyleCop for Delphi? I would really like to get the automatic checking of style, etc. into Continuous Integration.

+8  A: 

The closest I've seen is CodeHealer from SOCK software. We use it, and we have integrated it into our FinalBuilder build. It differs from FxCop in one important way: It analyzes the source code, rather than the produced executable. It also doesn't check quite as much as FxCop does. But I think it is the best thing which is available in this category for Delphi.

Delphi 2009 support isn't there just yet, but they say they're working on it.

Craig Stuntz
I've just tried CodeHealer, and whilst it looks OK, it doesn't support D2009, so this is a non-starter at the moment unfortunately
Mmarquee
Codehealer 2.6 (released 2009-10-20) includes support for Delphi 2009 and 2010 according to their web site
mjustin
@mjustin Just in time for Delphi XE :)
Craig Stuntz
+8  A: 

There's Pascal Analyzer from Peganza: http://www.peganza.com/products_pal.htm

I don't know how the features compare to FxCop, since I haven't really used either one.

Harriv
A: 

I've heard of something called Delforex but haven't used it myself (yet)

Stijn Sanders
A: 

Delforex is great for actually formatting the code. It does not do much more than that though. (we have/do use it).

I would second the votes for either Pascal Analyzer or Code Healer.

Vaccano

Vaccano
A: 

Doesn't Delphi output .net compatible IL code? I haven't used it in an age but I thought newer versions output .net assemblies.

If so then I would have thought FXcop would work and you could always add some of your own custom rules to it. Stylecop would not work but you could at least get FXCop running.

Tollo
Delphi 2009 is native win32. In this case this is unfortunate
Mmarquee
Codehealer 2.6 now supports Delphi 2009 and 2010.
Mmarquee
+1  A: 

Delphi Code Analyzer is another one that is open source.

YWE