[Java:S125] False positives for markdown documentation comments (Java 23 feature)

Java S125 incorrectly reports “This block of commented-out lines of code should be removed” on markdown documentation comments (Java 23 feature: JEP 467: Markdown Documentation Comments).

Context:

  • SonarQube Cloud

Text:

/// The base system topology describes:
/// - how specific components in the system, if present, are connected;
/// - what roles certain components may have;
/// - if the system requires changing the role of any existing equipment;
/// - and how these changes will impact the scope of work.
///
/// It serves as a bridge between a defined configuration (usually described in the installation manual of an energy storage system or microgrid controller)
/// and the granular representation of a circuit model.
class BaseSystemTopology {
}

View in SonarCloud:

I get the impression that any line ending in a semi-colon is assumed to be a line of code.

Do you get the same error if you replace the semi-colon with a full stop?

I can confirm that the semi-colon symbol is the one triggering the issue, I created a ticket to work on this issue

Thanks for the report!

1 Like

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