Quantcast
Channel: Delphi – The Wiert Corner – irregular stream of stuff
Viewing all articles
Browse latest Browse all 1440

Delphi and SonarQube: great open source additions in the last few years.

$
0
0

In the past, I mentioned that the open source SonarQube by SonarSource was on my “research list” in a few blog posts* as I am a fan of static code analysis **, and now it is time to amend them with the current state for using it in Delphi.

SonarSource products

  • SonarQube Server (formerly SonarQube) is an open core product for static code analysis, with additional features offered in commercial editions.
  • SonarQube Cloud (formerly SonarCloud) offers free analysis of open source projects.
  • SonarQube for IDE (formerly SonarLint) is a free IDE extension for static analysis.

For more history on them, see [Wayback/Archive] About – Sonar and SonarSource | Sonar.

Delphi integration

There are two open source integrations: for ConarQube Server, and Linting, both maintained by the same company ([Wayback/Archive] IntegraDev · GitHub):

SonarQube can also run your unit tests, which you should not do without any code coverage measurements. For those, use [Wayback/Archive] GitHub – DelphiCodeCoverage/DelphiCodeCoverage.

In the past, Embarcadero took over maintenance and put it in [WaybackSave/Archive] GitHub – Embarcadero/SonarDelphi: Embarcadero’s official version of the Sonar-Delphi plugin for use to analyze Delphi projects with SonarQube. Working to collect updates and contributions from other versions into this one and move if forward with new features., but like any 3rd party product they took over, they were marketed as big things but maintenance was at an absolute minimum (their owner Idera is basically a product marketing company strong-arming their ownees similar to the relation between puppeteers and marionettes).

Their commits can be counted at ………: some 15 commits, only in the README documentation parts.

Besides DelphiAST, this might be the only readonably up-to-date Delphi grammar available. In this case it is ANTLR based and hosted in [Wayback/Archive] sonar-delphi/delphi-frontend/src/main/antlr3/au/com/integradev/delphi/antlr/Delphi.g at master · integrated-application-development/sonar-delphi · GitHub (the DelphiAST grammar is in [Wayback/Archive] DelphiAST/Source/DelphiAST.pas at master · RomanYankovsky/DelphiAST · GitHub as past of the open source repository [Wayback/Archive] GitHub – RomanYankovsky/DelphiAST: Abstract syntax tree builder for Delphi)

Oh: SonarDelphi is mainly written in Java, so if you have maintenance or pull-request aspirations you know what to learn.

The SonarDelphi repositories have been at these places (from recent to past, tried to follow fork marks but not all have them):

  1. [WaybackSave/Archive] GitHub – Embarcadero/SonarDelphi: Embarcadero’s official version of the Sonar-Delphi plugin for use to analyze Delphi projects with SonarQube. Working to collect updates and contributions from other versions into this one and move if forward with new features.

    Has no fork markings

    Maintained until 20240322, when Embarcadero gave up.

  2. [Wayback/Archive] GitHub – Laurensvanrun/SonarDelphi: This repository contains the source code to the Sonar-Delphi plugin. Can be used to analyse Delphi projects with SonarQube.
  3. [WaybackSave/Archive] GitHub – JAM-Software/SonarDelphi: This repository contains the source code to the Sonar-Delphi plugin. Can be used to analyse Delphi projects with SonarQube.

    Maintained until 20221202 when Embarcadero forked it.

  4. [WaybackSave/Archive] GitHub – mendrix/SonarDelphi: This repository contains the source code to the Sonar-Delphi plugin. Can be used to analyse Delphi projects with SonarQube.

    Maintained until 20210409.

  5. [Wayback/Archive] GitHub – FactorySolution/SonarDelphi: This repository contains the source code to the Sonar-Delphi plugin. Can be used to analyse Delphi projects with SonarQube.

    Maintained until 20190923.

  6. [Wayback/Archive] GitHub – ekot1/SonarDelphi: This repository contains the source code to the Sonar-Delphi plugin. Can be used to analyse Delphi projects with SonarQube.

    Still maintains dependencies, but no features.

  7. [Wayback/Archive] GitHub – SandroLuck/SonarDelphi: This repository contains the source code to the Sonar-Delphi plugin. Can be used to analyse Delphi projects with SonarQube.

    Not an official form marking, but the readme points to the repository right below.

    Maintained until 20170413.

  8. [Wayback/Archive] GitHub – fabriciocolombo/sonar-delphi: SonarQube Delphi Plugin

    Maintained until 2016016

* Prior SonarQube blog posts

From my draft posts around SonarQube

** my blog posts on Delphi static code analysis

--jeroen


Viewing all articles
Browse latest Browse all 1440

Trending Articles