| Warning This plugin is not supported anymore. |
Name |
IntelliJ IDEA Sonar Plugin |
|---|---|
License |
LGPL |
Authors |
|
Latest version |
0.1 |
Download |
http://dist.sonar-ide.codehaus.org/idea/ or http://plugins.intellij.net/plugin/?idea&id=4971 |
Jira |
|
Sources |
|
Download snapshot |
| Table of content |
Compatibility Matrix
Plugin |
0.1 |
|---|---|
Sonar |
2.0.1+ |
9.0.1 (build 93.94) |
Installation
Once installed plugin can be automatically upgraded, when next version will be available.
Automatic installation
- Select "Sonar" from list of available plugins, download and install it : File -> Settings -> IDE Settings -> Plugins -> Available -> Sonar
- Restart IntelliJ IDEA
- Check that plugin installed successfully : File -> Settings -> IDE Settings -> Plugins -> Installed -> Sonar
This video demonstrates the process of installation.
Manual installation
- 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)
- Linux/Windows:
- (Re)Start IntelliJ IDEA
- 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:
- Open existen Mavenized project
- Import new project using: File -> Open Project -> Select Path to pom.xml
- 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 |

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 :
- Check that Sonar inspections turned on: File -> Settings -> Project Settings -> Inspections -> Sonar
- 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
See SONARIDE-43 |
TreeMap
See SONARIDE-22. |
