Skip to end of metadata
Go to start of metadata
Warning

This plugin is not supported anymore.

Table of content

Compatibility Matrix

Plugin

0.1

Sonar

2.0.1+

IntelliJ Idea

9.0.1 (build 93.94)

Installation

Once installed plugin can be automatically upgraded, when next version will be available.

Automatic installation

  1. Select "Sonar" from list of available plugins, download and install it : File -> Settings -> IDE Settings -> Plugins -> Available -> Sonar
  2. Restart IntelliJ IDEA
  3. Check that plugin installed successfully : File -> Settings -> IDE Settings -> Plugins -> Installed -> Sonar

This video demonstrates the process of installation.

Manual installation

  1. Download and extract archive in your plugins directory:
    • Linux/Windows: <USER_HOME>/.IntelliJIdea90/config/plugins
    • MacOS: /Applications/IntelliJ IDEA 9.0.1.app/plugins (right-click and select "Show package contents" to open the directory)
  2. (Re)Start IntelliJ IDEA
  3. Check that plugin installed successfully: File -> Settings -> IDE Settings -> Plugins -> Installed -> Sonar

Usage/Features

Integration with Maven

Open any Mavenized project and some parameters (groupId, artifactId) will be taken from pom.xml. There is three ways of how to do it:

  1. Open existen Mavenized project
  2. Import new project using: File -> Open Project -> Select Path to pom.xml
  3. Import new project using: File -> New Project -> Import project from external model -> Maven -> ...

Support for non-maven projects would be available in version 0.2 - see SONARIDE-38

Global Configuration

Would be available in version 0.2 - see SONARIDE-68

Project Configuration

In plugin configuration for project (File -> Settings -> Project Settings -> Sonar) you can specify:

  • URL of your Sonar server
  • Username and password for access to it

Support for branches would be available in version 0.2 - SONARIDE-84

Settings will be stored in file .sonar-ide.properties in project directory (see SONARIDE-94). Don't allow other people to see this file, since it contains your credentials in plain-text.

Violations

Open any Java-file and see violations from Sonar as markers in source code.

Source code from Sonar server may not match source code from your working copy, so we are using some heuristic algorithm to determine line with violation.

Duplications

Would be available in version 0.2 - see SONARIDE-17

Code coverage

Would be available in version 0.2 - see SONARIDE-16

Measures

Would be available in version 0.2 - see SONARIDE-19

Diff tool

Would be available in version 0.2 - see SONARIDE-97

Inspections

In order to start hunting violations on the overall project, you can use the IDEA inspection toolset with a separate inspection profile for Sonar :

  1. Check that Sonar inspections turned on: File -> Settings -> Project Settings -> Inspections -> Sonar
  2. Inspect code: Analyze -> Inspect Code

In this case all violations from Sonar will be associated with only one priority (warning by default) - see SONARIDE-31.

Select In 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 plugin :

View -> Select In -> Sonar

Quick Fix

TreeMap

Changelog

Release 0.2

Release 0.1 (30 Apr 2010)

Labels: