Sonar 2.5 in screenshots

by simon brandhof|

    The Sonar team is proud to announce version 2.5, the first release of year 2011 !

    As usual, this new release includes numerous improvements, bug-fixes and also interesting new features. Its main objective is to provide better control on the technical debt evolution. Prior to version 2.5, Sonar was really useful to assess application's technical debt but was not so handy to manage evolution over time. This is an important step toward full support of Continuous Inspection as focus should be first on making sure no one is adding to to the debt before starting to reimburse it !

    Here is presentation of the main features in screenshots :



    Differential Dashboards


    A new service has been added on project dashboards to view the changes that occurred on measures over a period of time, since a date or since a version. To activate this service, simply pick the desired period in the drop down list "Time changes..." :

    When a period is selected, the differential values will appear next to the project measures. So, it's pretty easy to see for instance how the density of comments has changed in the last 30 days. In the following example, it has increased of 1.2% :

    Differential Filters


    A new service has been added to filters in order to view the changes that occurred on measures over a period of time, since a date or a version. To activate this service, pick the desired period in the drop down list "Time changes..." in the filter. When managing a portfolio with hundreds or thousands of projects, this new service allows to quickly identify the projects whose technical debt has increased over a period of time :

    Differential Violations


    A new service has been added to view the violations that were created during a period of time. While differential dashboards and differential filters provide information on whether the overall number of violations has increased or decreased, the violations service shows the break-down and focuses on newly created ones :

    The creation date of a violation now appears in the code viewer :

    Quality Profile Inheritance


    Maintaining Quality Profiles can be tedious over time, especially where there are many. To ease maintenance of profiles, the ability of inheriting from a profile has been added in Sonar 2.5. The principle is that for a custom profile, you can decide that it is going to have a parent profile by using the Profile Inheritance tab :

    This means that the quality profile inherits all rules defined in the parent. This is shown visually in the rules configuration screen by a small blue marker next to the rule :

    A rule inherited from a parent cannot be de-activated but it is possible to change its parameter(s) and / or is severity. As soon as one of those is changed, a red marker replaces the blue marker

    Changes made to an inherited rule can be reverted by using the button "Revert to parent definition"

    New Sonar Coding Rules for Java


    5 new rules have been added to the Sonar coding rules engine, plus a sixth one to detect the usage of // NOSONAR tag that switches off violations :

    • Break instruction should not be used outside a switch statement
    • Instruction "continue" should not be used
    • Check method complexity
    • Depth of inheritance should not exceed a given threshold
    • Total class complexity should not exceed a pre-defined threshold





    House Cleaning


    It is is very useful to analyze frequently a project in Sonar to see progress on quality. It is also very useful to be able to see the trends over weeks / months / years. But when you are back in time, you do not really need the same level of details as you would for one week ago. This is why a "Database Cleaner" has been added to make holes in history and prevent Sonar users to care about frequency of Sonar analysis and growth of Sonar database size.

    It is also worth mentioning that support for the standard java @SuppressWarnings("all") annotation has been added to switch off violations at class and methods levels.

    The full content of Sonar 2.5 is available in the release notes. Please do not forget to read the install or upgrade guides. You are now ready to download the new version and enjoy it !