Lines too long rule

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension) - Enterprise Edition Version 8.9.10
  • what are you trying to achieve - Project analysis
  • what have you tried so far to achieve this - nothing yet

I have a rule where maximumLineLength is 100. Is there a way I can suppress this rule for certain lines of code, eg using some annotations etc?


This implementation is language-specific. I see you’ve tagged this with java, so you can add a //NOSONAR comment at the end of the line, or a @SuppressWarnings annotation on the method.

Note that //NOSONAR will suppress all issues on the line, not just this one.