-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Sonar Code Quality Testing Essentials
By :

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).
We have already talked about the RCI and now it is time to take a closer look at how it is calculated in practice. Sonar features a total of five different Severity Levels with their respective multiplier values:
Sonar Severity Levels | |
---|---|
Severity Level |
Severity... |
Change the font size
Change margin width
Change background colour