IntelliJ IDEA Sonar Plugin 0.1 in screenshots

by evgeny mandrikov|

    The Sonar Team is very proud to announce the release of the first version of the Sonar IntelliJ IDEA plugin. The Sonar IDE project consists at the moment of two plugins, one for Eclipse and one for IntelliJ IDEA, and has 2 active contributors : Jérémie and myself. This release is going to be followed by new ones in the upcoming weeks/months.

    The main objective of the Sonar IDE project is to bring the power of the Sonar platform inside the developer's IDE. In the initial versions of both plugins, the source code will be decorated on the fly with information provided by the Sonar web server. It means that the footprint of the plugins are very light and the continuous workflow of the developer is not disturbed. Note that source code from Sonar server may be slightly different from source code of the working copy, this is why a heuristic algorithm is used to match violations lines.

    Version 0.1 has the following limitations : it only works on Maven projects (feel free to vote for issue SONARIDE-38 if you wish support for non-Maven projects to be added) and only displays violations. Duplicated blocks, code coverage and commented out lines of code will be added later.

    As usual for releases, let's go through screenshots to discover this new functionality and how it can be used in your daily work to track violations. Enjoy !


    This step is straightforward : once a Maven project has been opened, the URL of the Sonar server and optionally username and password must be defined :

    Source code decoration

    Then you just have to open the java file you want to work on and violations are displayed with markers (on the left-hand side) :

    Global source code Inspection

    In order to start hunting violations on the overall project, you can use the IDEA inspection toolset with a separate inspection profile for Sonar (All violations are currently associated to a single priority - warning, see SONARIDE-31) :

    Go to Sonar

    At any time you can jump into the Sonar Web dashboard directly from the IDE to get more information not yet available in the Sonar IntelliJ IDEA plugin :


    Next version 0.2 will allow to visualize duplicated blocks, code coverage, ... directly inside IDEA, so stay tuned.

    To give it a try, you can download it or more simply install it using IntelliJ IDEA Plugin Manager. For more information you can visit Sonar IDE site.