Add Delphi language support

With plugin https://github.com/fabriciocolombo/sonar-delphi my trailversion sonar not started. Anybody have this problem and how you solved it?

1 Like

Hi @awod,

Please create a separate topic when you ask a question. This topic is for people requesting an official support of Delphi in SonarQube/SonarCloud.

The plugin you mention is not developed by SonarSource so it is better to ask directly its author. As it has not been maintained for 4 years there is little chance that the problem will be fixed.

1 Like

Delphi’s own QA tool so annoying bad, you would not believe…
You know about EMCD’s Demos? Surely, on an simple school or demo project may (may not) work,
but is not working on real life code. It’s to stupid, showing everything except real errors.

SonarQube Support for delphi would be really really helpful.

(only “working” tool I know is TMS FixInsight, but I’m sure SonarQube would be better)

I opened that on EMBCD QualityCentral as RSP-26128

5 millions lines of code.

@all who have same problem that QA Tool by EMBCD is not working (means anyone who tries):
I’ve tried a few tools, only working QA Tool I’ve found for Delphi is FixInsight by TMS
It’s not searching for a low of problems but help’s finding most common problems, code styling and performance bugs.

Peter - note that Pascal Analyzer is the most commonly used source code analysis tool for Delphi and it’s been enhanced for years. It has a large amount of tests but lacks in the feature set that SonarSource offers for tracking quality over time.

Hey Darian,
I may give it another try :smiley:

I’ve opened a few more Bugreports on EMBCD’s bad QA Tool,
maybe one day in future it will start working to.
So we can choos beween EMBCD, PascalAnalyser and TMS.

Just “a few” bugs i’ve found:

RSP-26183 QA Tool reports wrong LBNE error
RSP-26126 QA Tool does not recognize Assignfile() in constructor as an valid initialization
RSP-26125 QA Tools reports MSOL on multiple declaration
RSP-26124 QA Audits reports wrong AIOR error on string operation
RSP-26123 QA reports wron EVAZ on byte operation
RSP-26111 QA gives wrong warnings on case of bytetype
RSP-26106 QA Tool ramdomly shows SU (unreachable code)
RSP-26105 QA Audits reports exception handling code as SU (unreachable)
RSP-26104 QA Tool internal crash (didn’t give any result) afer adding example code

=> unusable

It’s almost 2020, any update on whether Delphi code analysis is being supported by SonarQube? I didn’t see it on the list of supported languages.
We have several million lines of Delphi code to analyze.

Thank you all for contributing. We well noticed that this thread has been voted more than 90 times as of now making it one of the top voted requested features.

On behalf of SonarSource, I can tell you there is no plan to add Delphi in the list of languages supported by SonarSource in 2020. There is actually no plan to add any new language in this list.
Instead, the plan is to go deeper for the languages we currently support.

In order to think about the future, can you share here which code quality standard do you follow on Delphi if any one exists?

Alex

We, Delphi Mystics, would be happy to help you with this. You are likely unfamiliar with Delphi Mystics as it’s pretty new as of writing this. We are producing shows related to Delphi development. Our main show co-hosts are myself (veteran Delphi developer), Dave Nottage (a Delphi MVP), and Jim McKeeth (Chief Developer Advocate at Embarcadero).

In addition to our experiences we have access to a large number of developers and book authors including Marco Cantu who wrote the Mastering Delphi series books. Delphi has experienced a pretty significant resurgence in the last 10 years due to the native cross-platform support, bare metal capabilities, and easy API access. There are literally millions of developers using it for both the maintenance of legacy code and developing scalable new code. I personally use it for medical, education, manufacturing, emergency services, and industrial applications. My clients range from small non-profits to Fortune 500 companies.

I’ll see if I can send you an email with my contact info. Maybe we can help.

Sincerely,

Zach Briggs, Co-Host
Delphi Mystics

We have just published an updated version our SonarQube Delphi plugin which supports Sonar 7.9 LTS and also the latest version, see https://github.com/mendrix/SonarDelphi. If you combine this with the DelphiCodeCoverage tool (see https://sourceforge.net/projects/delphicodecoverage/) and DUnitX (including the additional file in our SonarQube repository) you have a fully functioning SonarQube plugin for Delphi.

2 Likes

Any chance of reviewing this request again? It’s a top vote getter, currently with 93 votes where the second place seems to be 80 votes and third place is 49 votes.

2 Likes

As of today, confirmed this feature is still not on the list todo. Still #1 on the new feature list with 95 votes. #2 has 90, #3 has 54 votes, #4 has 40 votes. #2 is Rider support for Sonar Lint #3 is for Rust language support, #4 is for Dart language support.

Based on the work of @mendrix JAM Software created a fork of the SonarDelphi plugin. We fixed various grammar issues and a few others and were able to successfully analyze a project with >350k lines yesterday.

Any support would be highly appreciated as there is still a lot of work to do: We need more rules and some existing rules produce false positives. I started collecting those in the issue tracker.

4 Likes

We would also love to have Delphi available in Sonar natively. Currently we are testing JAM Software approach.

For people finding this Delphi thread, please now capture your interest in new features on the Sonar productboard portal here for SonarCloud and here for SonarQube.

1 Like

Please see this official GitHub repository from Embarcadero:

Hi all,

IntegraDev has been maintaining a greatly improved (and heavily rewritten) fork of SonarDelphi for the last 4 years.

I’m happy to announce that we’ve open-sourced the project and released SonarDelphi v1.0.0.

GitHub: https://github.com/integrated-application-development/sonar-delphi
Release: https://github.com/integrated-application-development/sonar-delphi/releases/tag/v1.0.0

Features

  • Powerful semantic analysis
  • 120+ analysis rules
  • Custom rules via templates or a programmatic java API
  • Import NUnit test reports (compatible with DUnitX)
  • Import test coverage reports (compatible with DelphiCodeCoverage)

Feedback and contributions are welcome!

2 Likes

SonarDelphi is now available through the SonarQube Marketplace! :tada:

This makes installation even simpler:

After that, you just need to configure your project properties. (See CONFIGURATION)

1 Like