Bug: non code is identified as code as a Code Smell L1860

    • Developer Edition Version 8.3.1 (build 34397)
  • This block of comments was identified as commented out code

  • submit this block of text in comments and let sonar scan it

  • potential workaround - ignore this reported code smell

Don’t know why this is being identified as code - that is clearly text and not java

P.S.: use the #bug:fault sub-category if you’re hitting a specific crash/error , or the #bug:fp sub-category for rules-related behaviour


First, your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

8.3.1 → 8.9.2 → 9.0.1 (last step optional)

Regarding your actual question, the rule to detect commented-out code blocks works on heuristics. I can’t tell you what word(s) in your example triggered the issue but this rule is imprecise by it’s nature.

I would just mark this one a FP & move on.


Got it - thanks!

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