Analyzing code with the Maven SonarQube plugin

Each of the code analysis tools we have seen in the previous sections identify specific issues in the code. While Checkstyle looks for violations in coding guidelines, PMD identifies common coding errors, and FindBugs detects bug patterns.

You could have your project configured to run all the three. In addition, you could also run plugins to identify coverage. You could also do all these and more by doing a SonarQube analysis of the project.

SonarQube is a platform to manage code quality. It is a web-based application, where rules, alerts, thresholds, and other metrics can be configured. It provides various ways to analyze code. The results of the analysis can then be viewed in a web application. SonarQube ...

Get Apache Maven Cookbook 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.