[NEW RELEASE] Sonar PMD Plugin 3.5.0

Dear community,

We just released a new version of the Sonar PMD Plugin!

Highlights:

  • Updated PMD (6.55.0)
  • Support up to Java 20-preview (close to 21)
  • Java 21+ falls back to 20-preview with warning (no error)
  • Updated Sonar Plugin API+impl (9.8.0.63668) (SonarQube 9.8+)
  • Upgraded various dependencies
  • Needs Java 17, the class file version is 61

Information

Regards,
Jeroen

3 Likes

Hi,

Congrats on the new release. This is in the Marketplace already.

So you know, this community announcement is no longer required; the PR is enough. You’re welcome to make the announcement, I just want to make sure you know you don’t have to.

 
:smiley:
Ann

1 Like

I am happy to hear from that plugin, because I would never have looked in the marketplace running a commercial SQ version…what would I have discovered there?

we are currently evaluation to import external PMD reports into SQ

The Sonar PMD plugin would go further and integrate the rules into SQ? But probably not for Apex (-> PMD Apex Rules · Issue #361 · jborgers/sonar-pmd · GitHub)?
Supported PMD 6.55.0 dates back to Feb 2023 for a certain reason?

Hi Falco,

Maybe it takes some time before the plugin shows up in the marketplace.
We are open for PR’s to support other languages like Apex.
PMD 7 is incompatible with PMD 6, so custom rule sets need to be migrated.
First priority is to support recent Sonar versions, second Java 21 and third newest PMD.

Hi,

I ran the job (successfully) on Monday, so the plugin should have shown up for 10.4 in the Marketplace and the Plugin Version Matrix then.

I’ve started the investigation internally.

 
Ann

Hi again,

I’ve figured this out. The PR you submitted, @Jeroen_Borgers only marks PMD 3.5.0 compatible through 10.4. Anyone running 10.4.1 or 10.5 won’t see it in the Marketplace - on purpose. Similarly, the Plugin Version Matrix shows compatibility with the latest point version of a plugin, which is why it doesn’t show up as compatible there.

If you’d like to submit a new PR to make the 3.5.0 compatibility end with LATEST, it would be processed quickly.

 
:smiley:
Ann

okay, we run SQ 10.4.1 and testing 10.5, so it won’t show up.

may be I did not fully understand the purpose of the plug in: all the rules in Apex Rules | PMD Source Code Analyzer date back to since PMD5 so they should to work with current plugin version and be fine to be integrated in a suiting SQ version?

Hi Ann,

Thanks, good to know.
3.5.0 is not working in SQ 10.5 because of its load-on-demand feature. It should work in 10.4.x though. Is that 10.4.LATEST?

1 Like

Hi Falco,

We currently only support Java rules in te plugin. We are working on Kotlin support, after having built that in pmd.

If you want to add Apex language support to the plugin, we are open to PR’s, we can provide you with some support. I guess it is not too much work.

Hi @jborgers,

Set the end of the range to 10.4.* and that will cover 10.4 and 10.4.1.

 
HTH,
Ann

Great, I just created the PR

And I just merged it.

 
:smiley:
Ann

That’s quick! Thanks!

1 Like