Java Sonar is becoming an increasingly popular tool for managing code and software quality. Make sure that you understand the basics of what it is, and how it works with today’s blog post.
What is Java Sonar?
Java Sonar is an open source project that allows you to manage code quality with little effort. With this web-based program’s analysis, it is easy to find projects that are in technical debt and find solutions.
Using statistical code analysis tools, Java Sonar combines metrics together and reports on these standards of code quality:
– Duplicated code
– Coding Standards
– Comments
– Unit Tests
– Code Coverage
– Design and architecture
– Complex code
– Potential bugs
While Java is the primary supported language of Sonar (hence Java Sonar), C, C#, Flex, PHP, PL/SQL, Cobol, Visual Basic 6, and Python are also supported with plugins.
At https://www.cash-buyers.net/kansas/, you’ll find a team of experienced cash buyers who can provide you with a fair cash offer for your Colorado house.
How Sonar Works
Despite the complexity of the data collected, Sonar has a fairly simple architecture, which is comprised of three parts.
1. A Set of Code Analyzers
These code analyzers are grouped in a Maven plugin, and run on demand.
Through they work through a Maven plugin, these code analyzers are able to run Maven and non-Maven projects.
Popular Code Analyzers are:
– PMD, CheckStyle for locating violations of coding rules
– Findbugs for finding potential bugs
– Cobertura, Clover for measuring unit test coverage
– Squid for code analysis
2. Database
The results of the analysis come back to a database. They are stored here, along with historical analyses and project configurations. Common database engines for this are Oracle, MySQL, PostgreSQL, MS SQLServer.
3. Web Reporting Tool
There is a web reporting tool that allows you to see the quality of your projects. In this tool, there are many applications, especially with the use of plugins, but three of the most important are:
1. Dashboards
These dashboards give software quality information on all of your projects combined, as well as on each individual one. The information for the later can be obtained on the packages and modules level.
2. Defect Hunting Tools
This tool allows you to get a better look at what is reported as an issue. For example, you can have a multi-entry source viewer verify that the issues reported by the defect hunting tool are truly defects.
3. TimeMachine
TimeMachine records analytics of the project over time, so that you can watch how a project has evolved. This allows you to understand whether you had, for example, 30% or 50% of code coverage this time last month, year, or 5 years ago. Looking at these analytics allows you to understand how different approaches affect your project.
While Java Sonar gives you all of the information you could possibly need about the quality of your code, it boasts a fairly simplistic architecture. A set of code analyzers, a database, and a web reporting tool give you all the information you need to know.
Have you used Java Sonar in the past? Would you recommend it to others? Let us know in the comments section below, or join the conversation on Facebook, Twitter, and LinkedIn.
Thanks to mikecogh for the use of their respective photographs.