Sonar 2.1 in screenshots

by simon brandhof|

    As usual this new release includes numerous improvements, bug-fixes and also brand new features that we believe are worth stopping your daily work for a few minutes to review. Those features can be divided into two categories :

    • Libraries cartography : what project is using which library and how ?
    • Powerful Squid rules to detect dead methods and calls to deprecated methods

    Libraries cartography

    Starting from use cases is the best way to explain how useful those new features are and how Sonar can now easily help you to solve your problem.

    Imagine that you want to eradicate the use of Commons Logging library from your projects (because it's evil). Simply go to the new "Dependencies" page, search for "commons logging", optionally select a version of the library and quickly see which applications need to be refactored :


    Let's say that you now want to know which transitive dependency can explain why your application depends on Fusesource Commons-Management library. Simply go to the new "Libraries" page on your application and start typing fuseso... :


    For more details, you can read the user guide.

    New Squid rules for Java

    Squid, the home made parser embarked within Sonar, has a pretty unique capability in the fact that it works not only on source code but also on byte-code. So far Squid was only used to compute metrics like LCOM4, RFC, complexity, .... From Sonar 2.1, we have created a rule engine on top of Squid. Three rules are already available :

    • detect unused private and protected methods as they are dead code. Dead code means unnecessary, inoperative code that should be removed. This helps in maintenance by decreasing the maintained code size, making it easier to understand the program.
    • detect calls to deprecated methods. Once deprecated, a method should no longer be used as it means that the method might be removed sooner or later. Squid analyzes both application, java API and external libraries bytecode to determine which methods / classes / fields are deprecated.

    (New Squid rules)

    System info

    The new page "System Info" provides detailed information about system properties, sonar configuration, installed plugins, Java VM memory statistics and database statistics. As the Sonar ecosystem is growing, there is a real need to provide such administration tools . In the upcoming Sonar versions, a new page should allow to dynamically install, uninstall, upgrade plugins and thereby imitate its older brother Hudson CI engine.
    (System Info)

    Better usability of drilldown pages

    Small but useful UI improvement : when navigating through the drilldown pages, the columns are now automatically scrolled to the selected items, so they are always displayed. This little UI improvement was loudly requested by the Sonar community :)
    (Drilldown UI)

    To find out more about Sonar 2.1 and the 50 issues that have been fixed, you can read the release notes or maybe you prefer to download it to give a ride. Have fun !