37

Are there any static code analysis tools for Delphi/Pascal?

I have seen plenty of options for C++ and .NET, but nothing for Delphi/Pascal.

Ideally something that could be integrated into a continuous integration system.

Rob Hunter
  • 2,787
  • 4
  • 35
  • 52

8 Answers8

22

Pascal Analyzer is nice.

chuacw
  • 1,685
  • 1
  • 23
  • 35
Rauhotz
  • 7,914
  • 6
  • 40
  • 44
17

If you want something that will give you various software metrics (complexity etc.) for your code then I strongly recommend SourceMonitor from Campswood Software. It works for C and C++ too, and it's free.

Rudy Velthuis
  • 28,387
  • 5
  • 46
  • 94
16

The Architect version of Delphi has a very powerful Audits and Metrics feature that does a complete analysis of your code. The feature provides a complete analysis of your source code. A very under appreciated feature, I think.

Nick Hodges
  • 16,902
  • 11
  • 68
  • 130
  • Is it somewhat mimicable in D5 + Jenkins + XUnit cooperation? – HX_unbanned Jan 05 '12 at 10:24
  • 3
    The Delphi Audit and Metrics are definitely useful by detecting not only coding rules violation, but also by **detecting architecture smells** . The results on my projects were very very interesting. This is surely the kind of unknown Delphi feature I think ! – TridenT Oct 25 '12 at 09:22
  • 2
    I've been using the Audits and metrics in Delphi XE2, and have found them a little broken (only been able to scan about 20% of a large project) - still very useful however and would certainly recommend them. – Alister Jun 20 '13 at 01:18
  • In XE2 they are very broken for me, giving wrong results and sometimes getting the line number wrong. Sad, because this tool would've been such a boon. – DBedrenko Aug 21 '15 at 12:09
9

CodeHealer does source code analysis and verification

A version came with BDS2006, But the number of visibility hints is limited to 4 per category. have a look at this link

It works well on a small project but this limitation makes it very hard if not impossible to use on a large project.

Charles Faiga
  • 11,665
  • 25
  • 102
  • 139
6

There is a new FixInsight tool which does source code analysis and verification.

Roman Yankovsky
  • 1,207
  • 11
  • 23
4

Pascal Analyser, Delphi 2006+ has built in audits and metrics, Source Monitor and Code Healer are the ones that I'm aware of - all are pretty useful.

Alister
  • 6,527
  • 4
  • 46
  • 70
  • 1
    For everybody reading later ; the full Audits and Metrics feature is found only in Delphi ARCHITECT SKUs only. Although I believe a very limited subset of audits and metrics were introduced in Delphi/RAD 2010 even in the Pro SKU. – Warren P May 12 '11 at 13:53
2

On Sourceforge there is a project Delphi Code Analyzer DCA with quite many downloads and last activity in 2009, maybe interesting

mjn
  • 36,362
  • 28
  • 176
  • 378
0

AQTime from AutomatedQA offers a Static Analysis Profiler. I have never used this profiler but am happy with those AQTime profilers that I use regularly. If you go down this path you can integrate AQTime with TestComplete to accomplish this sort of profiling as part of a continuous integration approach.