Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
Your browser does not support iframes.

This plugin is donation of Sabre Airline Solutions

Delphi Sonar plugin enables analysis of projects written using Delphi or Pascal. It was tested with projects written in Delphi 6, 7, 2006 and XE.

It is using grammar in ANTLR v3 format. It is extended on grammar found at


  1. Install the Delphi plugin through the Update Center or download it into the SONAR_HOME/extensions/plugins directory
  2. Restart the Sonar server


Run a Sonar Analysis with the Sonar Runner (Recommended Way)

To launch a Sonar analysis of your Delphi project, use the Sonar Runner.

A sample project is available on github that can be browsed or downloaded: /projects/languages/delphi/delphi-sonar-runner.

Run a Sonar Analysis with the other Analyzers

Maven and Ant can also be used to launch analysis on Delphi projects.


Install the Delphi plugin on your Sonar instance, and type "ant sonar" from sample project directory in order to try the plugin.


See Metrics documentation page.


  1. Counting lines of code, statements, number of files
  2. Counting number of classes, number of packages, methods, accessors
  3. Counting number of public API (methods, classes and fields)
  4. Counting comments ratio, comment lines (including blank lines)
  5. CPD (code duplication, how many lines, block and in how many files)
  6. Code Complexity (per method, class, file; complexity distribution over methods, classes and files)
  7. LCOM4 and RFC
  8. Code colorization
  9. Unit tests reports
  10. Assembler syntax in grammar
  11. Include statement
  12. Parsing preprocessor statements
  13. Rules
  14. Code coverage reports
  15. Source code highlight for unit tests
  16. “Dead” code recognition
  17. Unused files recognition