Revealing Code Quality

This chapter will cover the SonarQube code quality dashboard, static code analysis using Eclipse plugins, the Sonar runner and build scripts such as Ant, Maven, and Gradle, and code quality tools such as PMD, Checkstyle, and FindBugs.

A poorly developed system generates more bugs than a well-designed system. Manual testing can identify software bugs but cannot improve the quality of the system; however, TDD and JUnit tests are considered as automated unit testing frameworks, and they indeed help in improving the quality of the system. Static code quality analysis exposes quality issues in the code and provides suggestions for improvement, and continuous health monitoring keeps the system healthy.

The following topics will be covered in this chapter:

  • Code quality metrics

  • Static code analysis using PMD, Checkstyle, and FindBugs

  • The SonarQube dashboard

  • The SonarQube runner

  • Code quality analysis using Ant, Maven, and Gradle