False "unused import" warning if class is only used in Markdown Javadoc

Environment:

  • Operating system: Windows 11
  • SonarQube for IntelliJ plugin version: 11.6.0.83783
  • IntelliJ version: 2025.2.5
  • Programming language you’re coding in: Java
  • Is connected mode used: SonarQube Server Enterprise Edition v2025.1.3 (110580)

Description of the problem / question:

SonarQube IDE is fine with an import being used only in a conventional Javadoc comment:

    /**
     * @see LevelConverter
     */

But when converting this comment to the new Markdown syntax

/// @see LevelConverter

a warning java:S1128 Remove this unused import 'ch.qos.logback.classic.pattern.LevelConverter'. is created.

Expected outcome:

both conventional as well as Markdown flavored Javadoc should be treated the same (=no warning)

Hi,

First, kudos to you for opening 1 thread per question, even tho they are related. :tada:

And as I mentioned in your other thread (:sweat_smile:), we’ve done some work in 2025.4 to support these types of comments, but if you’re connected to 2025.1 you’re not going to see that.

It’s probably also worth mentioning that we’re not fully caught up with Java 25 yet. That’s a Q1 priority.

 
Ann

Hi also on this thread! Yes, I assumed these issues were related but was not 100% sure, since different Sonar rules triggered. Thanks for your answer and I’m looking forward to using the new version soon!

I can confirm that the warnings disappear when disconnecting from our (slightly) outdated SonarQube server. And that SonarQube IDE even gives new helpful hints regarding Markdown Javadoc, great! (“java:S7474 Markdown, HTML and Javadoc tags should be consistent”) :+1:

1 Like