By Freddy Mallet on June 25, 2009 » tags platform, plugins »
4 comments
You already know Sonar as an enterprise tool to analyze and manage code quality of a projects portfolio. We claim, for very good reasons obviously :-), that it is easy to install and easy to use. Currently, it covers Java and PL/SQL languages.
As a tool, Sonar is more and more often compared to commercial products such as Cast Software or Metrixware for instance. Having said that, if I had the choice, I’d prefer Sonar to be compared to Kalistik (commercial product) that better fits the market evolution and needs.
All this is great, but as you might have realized already, Sonar is more than a simple out-of-the-box product : it is an open source (LGPL) platform to manage code quality, i.e. the foundations on which the community has already started to build new floors. Our aim is that Sonar becomes to quality management what TCP is today to network applications : the central component to go further and faster. That’s our new dream since the command “mvn sonar:sonar” is available :-).
Here are real life examples that support the idea of Sonar being a platform:
- Let’s say you have built a commercial tool (PC-Lint, Simian, SAP ABAP Code Inspector … ) or an open source one (Testability Explorer, Crap4j, Clang Static Analyzer…) or let’s say that you think a new axis of quality analysis would be more pertinent. By developing a plugin in Sonar, you kill two birds with one stone : you immediately have access to a large community of users and you benefit from the built-in functionality (TimeMachine, trends, consolidation…)
- You manage a consulting company and are building a package around quality. By building this package around Sonar, your client gets basically the tool for free and what they are going to pay for is what you have to sell : your expertise on quality
I believe that code quality management is going to become a commodity in the medium term as is continuous integration today; and I do hope that Sonar is going to play a central role in this democratization move.
By Freddy Mallet on May 26, 2009 » tags javancss, release »
6 comments
Sonar 1.9 has just been released : installing this new version implies to be aware a few things. I’m not talking here about any technical complexity to upgrade from previous releases but about functional evolutions.
So far, the standard metrics (number of classes, number of comments, cyclomatic complexity…) were gathered using the well known JavaNCSS. However, as mentioned in a previous post, the metrics calculated by the current version of JavaNCSS has some flaws (creating new metrics is pretty difficult, comments are not available at class level), suffers approximations (nested classes are not managed) and crashes on certain code patterns (annotations, generics, none UTF8 characters). Therefore we have decided to proceed with a complete rewrite of JavaNCSS that we named sonar-squid.
Read the rest of this page »
By Freddy Mallet on May 14, 2009 »
3 comments
Christopher Judd recently blogged on his “Ultimate Enterprise Java Build System” and places Sonar in this system along with Maven, Hudson, Subversion and Nexus.
On Sonar, he writes: Sonar is a server that provides a dashboard into your code quality. It integrates with many common code quality tools like PMD, Checkstyle and FindBugs. It include metrics for code coverage, unit testing and lines of code. The trending capabilities make it easy to identify patterns.
We naturally do share the same vision for an Enterprise Java Build System but beyond the tools, the underlying fundamental question is : “Does the future of Enterprise development forges will be monolithic or modular ? “.
Read the rest of this page »
By Freddy Mallet on May 7, 2009 » tags functionality, screencast »
one comment
In the last couple of weeks, we’ve started making short videos on Sonar, each one showing a dedicated feature in 1 or 2 minutes. Those videos are a good starting point for people wanting to have a rapid but comprehensive view of the Sonar platform. Our animation studios are still pretty young but here are the first three films : chasing duplications, installing Sonar and TimeMachine. Your feedback to improve the next productions is highly welcome.
In order to make the videos, we tested several tools and decided to buy Screenflow. From all the ones we tested, Screenflow is really the best : easy to use, fast with just the effects we were looking for… and all that for $99. Its only weakness : it runs on Mac, but is it really a weakness ;-)
Read the rest of this page »
By Freddy Mallet on April 16, 2009 » tags functionality, plugins »
6 comments
Amongst Sonar built-in strengths, we mentioned extensibility several times without giving many details. Time has come to discuss it further as anyone can now easily contribute to the Sonar plugins ecosystem.
We do know extensibility of a tool is a key aspect to get it widely adopted. That is why we built Sonar around a very light core that consists mainly in an extension mechanism. Everything else in Sonar is a plugin. However, having such a mechanism in place is only one step amongst four to reach extensibility and leverage this capability :
- An easy to use API
- A forge
- An active community
- A “Getting started” documentation with examples
We believe that we have today a sufficient base on all four points.
Read the rest of this page »
By Freddy Mallet on March 19, 2009 » tags javancss »
2 comments
JavaNCSS is an open source tool that generally does not require much introduction to Java developers : indeed it was born at the same time the Java community started to grow (precisely in 1997).
JavaNCSS is a tool that analyzes java source code and reports on what we call the standard metrics : cyclomatic complexity, number of non commenting statements, number of classes, number of methods… Sonar uses the tool during the analysis phase to calculate those standard metrics, establish the Rules Compliance Index (RCI), the percentage of duplicated lines, etc.
Throughout time it has occurred to us that JavaNCSS has got some limitations that make the data reported in Sonar sometimes slightly incorrect :
- Nested classes are ignored
- Javadoc information is not available at class/method level
- Number of physical lines of code is not available
- No way to ignore header comments which usually contain license description
- Annotations and Generics are only partially supported
Those limitations are mainly due to a technical flaw : java grammar and code to calculate metrics were originally developed in a single file. As a consequence, it has become more and more difficult to make the grammar evolve to support new Java versions and it is a bit cumbersome to change the code to calculate new metrics or change existing ones. During the last 10 years, Clemens Lee (the project initiator and leader) kept on maintaining and improving the tool. 10 years is a long time for a software, time has come to build a new house for this old lady !
That is where the Sonar Team comes into play : we thought we could make a contribution to JavaNCSS in order to bypass the current issues. This type of issues has already been solved by others OSS tools such as Checkstyle and PMD : they only use the grammar to generate an Abstract Syntax Tree (AST) that can subsequently be browsed with a visitor pattern. That is what we did when we built a proof of concept based on a checkstyle architecture.
A version of the new tool is currently being packaged as a Sonar plugin (SONARPLUGINS-36) and in the same time we are actively working with the JavaNCSS team to release a new version of the product that leaves behind all the limitations. From there, we will be capable of calculating new metrics such as NPath, Maintainability Index …
Here is an example of impacts on the Project dashboard service :

By Freddy Mallet on March 13, 2009 » tags functionality »
3 comments
Did we ever mention why, two years ago, we chose Sonar as a name for the open source platform to manage quality we wanted to build ? It was obviously to make an analogy with a sonar that is an acronym for SOund Navigation And Ranging ! Sonar sounds the sea of your projects to identify flaws and evaluate part of your technical debt. To do so it offers 3 main functionality :
- Quality profiles Manager
- Project and portfolio dashboards
- TimeMachine
The first one sets the base to tune your Sonar, the next two are being used to quickly see where projects stand and how they evolve in time according to the following axes :
Read the rest of this page »
By Freddy Mallet on February 5, 2009 » tags functionality, maven »
9 comments
As we get more and more questions about possible overlaps between Sonar and Maven Site, I think it is time to explain the clear vision we have on this important subject. Let me start by answering three questions :
- What is the Maven Site made for ?
Provide a static portal to publish documentation on projects. By the way, this portal is used by many Open Source projects as their main web site (for instance Commons Collections or Cargo).
- What is Sonar made for ?
Provide an enterprise OSS capable of handling, managing and reporting all data related to source code quality
- What are the possible overlaps?
All the quality reports available in the Maven Site under “Project Documentation -> Project Reports”, such as CPD Report, PMD Report, Cobertura Tests Coverage, …
Read the rest of this page »
By Freddy Mallet on January 27, 2009 » tags functionality »
one comment
I have spent roughly 10 years in software development, continuously aiming to improve team collaboration. Two months ago, I was convinced that we had a complete set of very good tools for Sonar development, and that even if they were not the bests, switching would not make a big enough difference to be worth it. In other words, I could not possibly imagine that we might adopt instantaneously a $75 product, wondering two days later how it was possible to not have it before.
The miracle product is called Balsamiq Mockups. That’s a pretty simple Flash application, with a minimalist user interface, allowing to draw almost any kind of graphical interfaces in minutes just like if you have a pencil in hand. I know what you think : PowerPoint or OpenOffice Presentation are good enough to design mockups. I thought so too… Give a try to Balsamiq and I bet you’ll fell in love in less than 5 minutes.
Read the rest of this page »
By Freddy Mallet on January 21, 2009 » tags event »
no comments