In SonarQube 4.5.x LTS the annotation @SuppressWarnings
could be used to suppress false positives in code but after upgrading to 5.4 and re-arranging some packages these, previously suppressed, issues have resurfaced. Why?
I have been told that the recommendation from SonarSource (company developing SonarQube) is to suppress false positives from the administrative UI but we prefer to do it directly in code for reasons*. The violation below is clearly suppressed using the annotation:
Is @SuppressWarnings
no longer handled in SonarQube?
* Reasons include:
- No dependency on SonarQube database state
- Not having to rely on SonarQube being able to identify an old suppressed line of code when changed)
Update (2017-02-03): SonarQube 6.x handles moving code around and keeping false positives