Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sonar+github integration

I want to enable sonar with git but is it neccesary that first pull the project from git repository using hudson or something else and then sonar will analyse the code periodically on hudson .am I right means my steps :

1.Pull project from git using hudson.

2.Sonar on hudson will analyse the code and send the updates.?

or directly we can use git+sonar how it works ,can anybody guide me to get it work.

like image 376
pbhle Avatar asked Jan 28 '13 09:01

pbhle


People also ask

How does GitHub integrate with SonarQube?

To update your global SonarQube settings: Navigate to Administration > Configuration > General Settings > DevOps Platform Integrations > GitHub > GitHub Authentication and update the following: Enabled – set the switch to true . Client ID – the Client ID is found below the GitHub App ID on your GitHub App's page.


2 Answers

Yes, you need first to pull your project from GitHub, and then launch a Sonar analysis on your local copy (Sonar needs the file to exist on the file system to be able to analyse them).

So you can pull your project manually or obvioulsy using a CI server like Jenkins/Hudson.

like image 99
Fabrice - SonarSource Team Avatar answered Dec 19 '22 23:12

Fabrice - SonarSource Team


The good news, yesterday (2015-07-08) SonarQube has launched a Github Pluging, every time a pull request is submitted, the CI system launches a SonarQube preview analysis.

Reference: http://www.sonarqube.org/github-pull-request-analysis-helps-fix-the-leak/

like image 29
Gaspar Belandria Avatar answered Dec 19 '22 23:12

Gaspar Belandria