Summary
In this chapter, we discussed software complexity. We also discussed how it is measured and what Sonar can offer in order to help us identify complex constructs. We saw some core measures and metrics that govern complexity such as Cyclomatic Complexity, Coupling and Cohesion, Response for Class, and Lack of Cohesion. Then, we added the appropriate rules to the Sonar profile and examined all widgets reporting such measures. At the end of the chapter, we focused on dependencies and detailed the Sonar design matrix, an invaluable component, which, once mastered, will enable you to isolate dependencies in a quick and efficient way.
In the next chapter, we will discuss how Sonar measures Test Coverage and Testing, as it is an essential and vital practice towards quality software. Testing and coverage is the countermeasure towards complex software ensuring stability and expected behavior.