False Positive: Comment that starts with Do

  • What language is this for?
    • Java
  • Which rule?
    • java:S125
  • Why do you believe it’s a false-positive/false-negative?
    • Comment was // Do ONE or TWO simple commands..., which is not a line of code
  • Are you using
    • SonarQube - which version?
      • Developer EditionVersion 9.8 (build 63668)
    • SonarLint - which IDE/version?
      • IntelliJ 2022.3.1 (SonarLint
      • in connected mode with SonarQube or SonarCloud?
        • SonarQube
  • How can we reproduce the problem? Give us a self-contained snippet (best) or screenshot (good)
    • // Do ONE or TWO simple commands...


Welcome to the community and thanks for this report!

Unfortunately, this rule necessarily uses a heuristic which is imperfect. Improving this is something our researchers are looking into at the moment, but I don’t expect massive improvements any time soon.


No problem and completely understandable. Just wanted to put in the report =) Thanks for the response.

1 Like