Book Image

Apache Maven Cookbook

Book Image

Apache Maven Cookbook

Overview of this book

Table of Contents (18 chapters)
Apache Maven Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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 also provides several paid plugins, such as SQALE, and for specific languages, such as Cobol and C++.

Getting ready...

Let's briefly discuss some basic requirements for using the Maven SonarQube plugin:

  1. Visit the download page for SonarQube at...