Writing custom java rules 101 <-> Sonarlint for Eclipse 5.8.1

Hi,

upgraded my custom java rules for Sonarqube 8.8 and used the instructions of
https://github.com/SonarSource/sonar-java/blob/master/docs/CUSTOM_RULES_101.md#looking-at-the-pom

which has these entries in pom

<properties>
  <sonarqube.version>8.8.0.42792</sonarqube.version>
  <sonarjava.version>6.14.0.25463</sonarjava.version>
</properties>

Now i wanted to test if my rules are working with the latest Sonarlint for Eclipse 5.8.1 but

sle_custom_error

Sonarlint console has

[…]
Load plugins
Plugin ‘XXX Java Custom Rules’ requires plugin API 8.8.0.42792 while SonarLint supports only up to 8.5. Skip loading it.
Load plugins (done) | time=80ms
[…]

Unfortunately this is completely ignored in custom java rules 101, though the example pom has
<sonarLintSupported>true</sonarLintSupported>
Will Sonarlint support plugin API 8.8.0.42792 until Sonarqube 8.9 LTS is released ?
If not, how to fix my custom rules to make it work with the latest Sonarlint for Eclipse, simply use ?

<properties>
  <sonarqube.version>8.5.0.37579</sonarqube.version>
  <sonarjava.version>6.14.0.25463</sonarjava.version>
</properties>

Gilbert

<properties>
  <sonarqube.version>8.5.0.37579</sonarqube.version>
  <sonarjava.version>6.14.0.25463</sonarjava.version>
</properties>

works.

Hi Gilbert,

When you build your plugin with sonar-plugin-api 8.8.0.42792, we can only assume your plugin is compatible with 8.8 and later.
If you are sure to not use an API introduced recently, you can compile with latest (e.g. 8.8), but still advertise your plugin as compatible with older versions (like 7.9), using property <sonarQubeMinVersion>7.9</sonarQubeMinVersion> in your pom.

++

Hi Julien,

thanks for the hint!
Those details about Sonarlint compatibility should be added to the custom rules 101, i guess it’s
important for many users that their custom rules will also work with Sonarlint.

Gilbert

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.