SCM Plugin Integration with Sonar Qube - sonarqube

Can anyone explain me why we need SCM Plugin in Sonar Qube what are the benefits of it.I tried to find the same solution on below link:-
1. http://docs.sonarqube.org/display/PLUG/SCM+Activity+Plugin
2. http://docs.sonarqube.org/display/SONAR/SCM+support
But did not get much knowledge about it.

You don't need the SCM Activity Plugin; the core functionality to support SCM data was rolled into the platform in 5.0.
You do need the plugin that corresponds to your SCM engine. It provides the specific integration between your SCM's commands and the SonarQube server. That is, it actually talks to your SCM to get the commit data for each line of each file and puts it in a format SonarQube can understand.

Related

How do I use Sonar Plugin with Hudson?

I want to use SonarQube for Code Quality analysis. I have Hudson as the CI tool and have integrated clearcase. How do I use SonarQube when the Ant build happens? Do I need to install SonarQube in a server and use a plugin to access it?
Can someone help me?
Install SonarQube web server as a first step. Default port will be localhost:9000.
After installing SonarQube you need to create an Ant target. Sample Script is available on GitHub. If Hudson is working correctly earlier. It will pick up the changes in Ant Script and perform the Analysis. After the completion of Analysis report will be generated and accessible at SonarQube Web Dashboard.

SonarQube 5.4 SCM Stats plugin?

I am trying to get commit and author details for a project in sonarqube.
I see scm stats plugin does it for prior versions.
I am using the latest version sonarqube 5.4.
Is there any way we can use scm stats plugin for sonarqube 5.4 or any alternative that i can use?.
Please help.
You can use new SCM functionality offered by SonarQube and no need for SCM plugins.
Go to Administration -- > on left hand side you will see "SCM" option.
For my team , we were looking for SCM report but unfortunately its not available ,so we are using web API to generate it by own.

Is it possible to use Bazaar with SonarQube?

I've just installed the latest SonarQube 5.0.1 locally to try it out. The project I'm working with at the moment is hosted in Bazaar (bzr) source control. I looked at the SonarQube list of SCM plugins here:
http://docs.sonarqube.org/display/SONAR/Plugin+Library
Bazaar is not listed. Are there any workarounds or independent projects that I could use to get the scm history information from Bazaar into SonarQube? At this point I am just trying to get a sense of the value of the information to our project, rather than worry about a scalable production-ready solution.
There is currently (2015-04-09) no SCM plugin for Bazaar. If you wish to contribute one, feel free to take inspiration from e.g the SonarQube SCM integration plugin for Git.

Sonar - Failure because Class is not committed in svn?

I recently started using SonarQube on my Maven Java Project. The problem is that I modified a single line in a Class which causes Sonar failing to load the project into the database. Why does Sonar know that my project is checked into a SVN and why does mvn sonar:sonar fails with "can not blame XXX on line YYY" if a class is not committed into the SVN?
I am the only one working on this and I dont want to check in every single change or experimental code snipet. How can I turn this feature off?
Thank you!
SCM integration (which detects that your projects uses SVN) allows SonarQube to track changes to source code, e.g to compute coverage on new code, new issues etc.
A standard analysis is supposed to be performed from commited code (e.g by a continuous integration server) to serve as a reference.
In your case, I would advise you to use the incremental mode: this will allow you to perform an analysis on your local code changes, which will not be persisted to the central server, but which will show you which issues your new code introduced/fixed (this is the analysis mode used by the IDE integration plugins).

Eclipse sonar plugin vs findbugs+pmd+checkstyle eclipe plugins

We are trying to install a CI Platform with (Jenkins,sonar,eclipse ...).
So that every developer can make analysis on his code before commit, I'm wondering between two alternatives :
running local analysis with the sonar plugin.
install the different plugins that sonar use (findbug,pmd,checkstyle ...) and configure them to meet the sonar configuration.
I'm not sure which alternative to use? I used to work with findbugs,pmd, checkstyle in eclipse and they look great.
Can you tell me which is the best alternative?
Thanks in advance.
Regards.
With Sonar plugin you can manage the violations like:
Create a review
Mark a violations as false positive or fixed
View the hot classes and hot violations
View yours reviews
If you use separate plugins you have to go sonar web to do that.
The great advance of sonar is the reviews.
Other question is how many projects you have and will have. I currently work with more than 70 projects and many profiles. Is more simple to me run analysis with one plugin, because I need just add the server and find the project. With other plugin you need add the link for each project in each plugin configuration.
Why not install the Sonar Eclipse plugin?
This was designed to solve the following problems:
Sonar does not support parallel analysis of the same project. This issue rules out the option of each developer running Sonar locally. (See SONAR-2761, SONAR-3306)
You don't really want developers uploading metrics and source code into the Sonar database. They could be working on an uncommitted workspace and would therefore cause both inaccuracies and confusion if Sonar is being used for code review.
Sonar is really designed to be run from a continuous integration server (like Jenkins), building code that has been submitted onto a shared codestream (or branch)
The big advantages of using the Eclipse plugin are:
True local analysis, no updates of the Sonar database
Configuration of the other tools is retrieved from the Sonar server and jars automatically downloaded.
Centralized management of Sonar quality profiles

Resources