O'Reilly logo

Sonar Code Quality Testing Essentials by Charalampos Arapidis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Sonar profiles, rules, and violations

Sonar validates source code against a quality profile. Based on profile settings, the source code analyzers take turns parsing code and apply numerous rules. When a rule is broken, a violation is created, but what is a rule and how does it correlate to the overall quality?

Each Sonar profile consists of a collection of rules. Think of these rules as constraints to your source code. Each time Sonar parses, your code checks whether a rule is followed or not. In case the rule's criteria are not met, a new violation is created at a predefined Severity. The severity or level of the violation is a weighted value that affects overall quality of the Rules Compliance Index (RCI).

The Rules Compliance Index

We have already ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required