When I encounter a violation in Sonar (in violation drilldown tab), in the source code view Sonar has some action like comment, assign, etc, one of those is False-positive, I want to know what exactly is the meaning of this operation, and when should I use it?
When I encounter a violation in Sonar (in violation drilldown tab), in the source
Share
As any automatic tool, Sonar – and the rule engines it relies on (Findbugs/PMD/Checkstyle/…), can make “mistakes” while raising a violation: only a human can detect this, and you have the ability to flag this “mistake” as a false-positive to be sure that you won’t spend time on it again.
Obviously, this feature must not be used to mute real violations. What’s more, each time you flag a violation as false-positive, a good habit is to write a meaningful comment (and also report the issue on the user mailing list of the corresponding tool).