Configuration and usage specific to Eclipse SonarQube plugin will be described here.
Install Sonar Eclipse plugin according to the version of your Eclipse IDE
http://docs.codehaus.org/display/SONAR/Installing+SonarQube+in+Eclipse
Configure Sonar Eclipse plugin as mentioned here, note the following specific configurations need to be done
URL https://analysis.apache.org
Username / password : leave blank
Window > Preferences > SonarQube,
In “JVM arguments for preview analysis” field, set the following
-Dsonar.scm-stats.enabled=false
Now you can associate any project with Sonar and perform analysis
Results will be displayed in “SonarQube Issues” tab in Eclipse.
Double click on an issue, it will take you to the exact line number.
For more information on this please refer this link
Refer this for setting up local SonarQube server in your machine. Then you can run a local analysis as below instructed,