Chapter 6. Keeping your source code files elegant
This chapter covers
- Distributing complexity
- Lack of Cohesion of Methods: files that do too much
- RFC and couplings: classes with too many friends
An active project gets bigger day by day, week by week. As your software grows, it becomes more complex. New classes are added, and methods and attributes are created or improved. Each time you make a change, you’re probably affecting the health of your system’s design. Whenever logic is added, the complexity of the file, the package, and the module is increased.
Fortunately, SonarQube can alert you to these kinds of issues. For instance, it can tell you when the quality of your design goes down, when the increasing complexity of a file starts ...