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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.