- 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
- Comment was
- Are you using
- SonarQube - which version?
- Developer EditionVersion 9.8 (build 63668)
- SonarLint - which IDE/version?
- IntelliJ 2022.3.1 (SonarLint 7.3.0.59206)
- in connected mode with SonarQube or SonarCloud?
- SonarQube
- SonarQube - which version?
- How can we reproduce the problem? Give us a self-contained snippet (best) or screenshot (good)
// Do ONE or TWO simple commands...
Hi,
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.
HTH,
Ann
No problem and completely understandable. Just wanted to put in the report =) Thanks for the response.
1 Like