Jump to content
Elliot Hillary

DelphiLint v1.1.0 out now!

Recommended Posts

delphilint-title-light.png.846c571c12e0030493da87e6d2162248.png

We're excited to release version 1.1.0 of DelphiLint, a free and open-source static analyzer and linter for the Delphi IDE!

 

DelphiLint is powered by SonarDelphi, our Delphi analyzer for the SonarQube code quality platform, and can be run in two modes:

  • Standalone - run analyses entirely locally, no server required

  • Connected - connect to a SonarQube server, allowing for synchronization with the server's quality profiles and configuration

 

Release: https://github.com/integrated-application-development/delphilint/releases/latest

Blog Post: https://github.com/integrated-application-development/delphilint/discussions/43

 

New Features in 1.1.0

  • Quick fixes - fix issues using suggested automatic changes
  • Standalone rule configuration - configure the analysis rules that are applied in Standalone Mode
  • Declutter files by hiding issues
  • Many performance improvements and bug fixes

 

For more details, see the blog post for release 1.1.0 and the repository README.

  • Like 9

Share this post


Link to post

Installation in Delphi 11 went OK but it is not working in Standalone mode

because it wants to reach a DelphiLint Server.. 

 

image.png.26cb608b0403c6ba7899fd8c65e4e53e.png

Share this post


Link to post

I have the same issue.

DelphiLint tries to contact a server, but I just want to use it in Standalone mode.

I had the same issue in the previous version, so I had hoped that it would have been fixed in this new version.

Share this post


Link to post

Hi @Die Holländer, @Torbjörn,

 

DelphiLint is not trying to contact an external server, it is trying and failing to start the backend analyzer process (the "DelphiLint server").

I would recommend having a read of the FAQ, particularly the section titled DelphiLint fails, saying that the server failed to communicate the port. It is usually caused by using an older Java version than DelphiLint's minimum requirement (Java 11).

 

6 minutes ago, Torbjörn said:

I had the same issue in the previous version, so I had hoped that it would have been fixed in this new version.

If you ever have a problem, please raise an issue! We can only test so many device configurations and DelphiLint has no telemetry, so we rely on user reports to let us know what to fix.

Share this post


Link to post

Hi @Elliot Hillary

 

It was that it pointed to the wrong Java version.

I think it would be good to have a better error message for this, and/or add the exact error message text to the FAQ.
If the exact error message text had been in the FAQ, I would probably have found it when I googled the exact error message text.

 

After fixing the path to version 11 of Java, it got a bit further, but ultimately it displayed no issues for my project.

My project is quite big and I know that there should be issues reported on it, but I suspect that my IT department blocks certain aspects of Java from working.

(I got a popup saying that my IT policy blocked something network-related from working, but unfortunately it does not show up again and I don't remember exactly what it said)

 

Summary:
Unfortunately I don't think that I can use DelphiLint as long as it relies on Java.

Share this post


Link to post

After a successful installation, the first time you use DelphiLint it wants to have Internet access to get something from GitHub. Why didn't the installer provide all the staff DelphiLint needed?

 

NRCmL6dsxP.png

Share this post


Link to post
3 hours ago, Elliot Hillary said:

It is usually caused by using an older Java version than DelphiLint's minimum requirement (Java 11).

Yes, This was the case. It seems that I've 3 Java installations from different software installations. (Java, Eclipse, Oracle)

On CMD prompt type : "where java"

I was pointing to the Java installation and indeed it is an older version.

On CMD prompt type: "java -version"

After I added the Eclipse "Java.exe" in the settings DelphiLint is working.

Share this post


Link to post

It seems that I can only analyze my *.dpr file, which contains very little code.

How do I analyse other Delphi *.pas files?

When selected then "Analyse this file" is grayed out..

Share this post


Link to post

After reading some of the other posts here about Java 11, I breezed through the installation for both D11 and D12, opened a small project, made sure several units were open in the IDE, and selected Analyze All Open Files. I like how the suggestions are brightly highlighted right in the IDE--many good suggestions. This is pretty slick!

 

I thought at first it only analyzed the current file but as soon as I switched to a different file in the IDE, the Delphi Lint window updated with the different list of suggestions for that file.  Double slick!!

  • Like 3

Share this post


Link to post
10 hours ago, Die Holländer said:

It seems that I can only analyze my *.dpr file, which contains very little code.

How do I analyse other Delphi *.pas files?

When selected then "Analyse this file" is grayed out..

Hi @Die Holländer, I'm glad that fixing your Java path resolved the problem!

 

DelphiLint has the concept of a "project directory", which is basically the root directory of the analysis - files outside the project directory cannot be analyzed.

There is a relevant FAQ section here describing how to change the default project directory.

In your case, I'm guessing the *.pas files are in a different directory to your *.dpr? Changing the project directory to a common parent directory will allow you to analyze all your project files.

 

14 hours ago, zed said:

After a successful installation, the first time you use DelphiLint it wants to have Internet access to get something from GitHub. Why didn't the installer provide all the staff DelphiLint needed?

 

NRCmL6dsxP.png

Hi @zed,DelphiLint downloads the SonarDelphi analyzer in the background, since it uses it internally. You can configure exactly which version you want, which is why DelphiLint does it, not the installer.
That being said, I suppose the installer could download the default version for you so that you can use it fully offline immediately if you choose. Thanks for the suggestion!

 

8 hours ago, corneliusdavid said:

After reading some of the other posts here about Java 11, I breezed through the installation for both D11 and D12, opened a small project, made sure several units were open in the IDE, and selected Analyze All Open Files. I like how the suggestions are brightly highlighted right in the IDE--many good suggestions. This is pretty slick!

 

I thought at first it only analyzed the current file but as soon as I switched to a different file in the IDE, the Delphi Lint window updated with the different list of suggestions for that file.  Double slick!!

Hi @corneliusdavid, really glad to hear that you're enjoying DelphiLint! This release has a number of user experience improvements that are undoubtedly contributing to that ever-important slick factor. :classic_biggrin:

Share this post


Link to post
6 hours ago, Elliot Hillary said:

Hi @Die Holländer, I'm glad that fixing your Java path resolved the problem!

 

DelphiLint has the concept of a "project directory", which is basically the root directory of the analysis - files outside the project directory cannot be analyzed.

There is a relevant FAQ section here describing how to change the default project directory.

In your case, I'm guessing the *.pas files are in a different directory to your *.dpr? Changing the project directory to a common parent directory will allow you to analyze all your project files.

Yes, I have divided my code in business objects, data objects, form and project directories.

I've changed the "project directory" in DelphiLint to one of these directories and that worked fine !

I have to say that DelphiLint is one of the nicest Delphi tools I've seen for a long time. 👍:classic_love:

 

image.png.f9b9057e10d74e71c0322cd6b406e949.png

 

 

  • Like 3

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×