Sonar Code Complexity metrics

Sonar hosts a wide selection of complexity-related rules to help us monitor our software projects. Next, we are going to add 17 rules of major severity to the custom packt profile.

Complexity rules profile distribution

Severity

Rules count

Value

Major

17

17 x 3 = 51

Total value

 

51

Log in to Sonar as administrator and add the following rules to the custom packt profile:

Complexity rules

Severity

Name

Analyzer

Major

Boolean Expression Complexity

Checkstyle

Major

Class Data Abstraction coupling

Checkstyle

Major

Class Fan Out Complexity

Checkstyle

Major

Cyclomatic Complexity

Checkstyle

Major

JavaNCSS

Checkstyle

Major

Nested For Depth

Checkstyle

Major

Nested If Depth

Checkstyle

Major ...

Get Sonar Code Quality Testing Essentials now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.