Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can SonarQube fetch Data from a Git Repository?

I have a SonarQube Instance running on my Debian 7 machine, and now I want that every time I push something in my git repository (BitBucket), the SonarQube Server automatically starts the scan from my repo.

Is this possible? And how?

Thanks

like image 652
Felix Avatar asked Mar 05 '15 09:03

Felix


People also ask

What is SonarQube used for?

SonarQube (formerly Sonar) is an open-source platform developed by SonarSource for continuous inspection of code quality to perform automatic reviews with static analysis of code to detect bugs, code smells on 29 programming languages.

How do you integrate SonarQube?

Configure your SonarQube server(s): Log into Jenkins as an administrator and go to Manage Jenkins > Configure System. Scroll down to the SonarQube configuration section, click Add SonarQube, and add the values you're prompted for. The server authentication token should be created as a 'Secret Text' credential.

What is Sonar programming?

Sonar is a software quality management platform primarily for Java programming language, enabling developers to access and track code analysis data ranging from styling errors, potential bugs, and code defects to design inefficiencies, code duplication, lack of test coverage, and excess complexity.


1 Answers

No, this is not possible. This is not the responsibility of SonarQube to handle this part. Instead, you should configure a CI server (like Jenkins) that will do this job: check if your repo has been updated, and if so, trigger a SonarQube analysis.

You can read the following answer that is not exactly related to your question but that describes what you should do: Do I need sonar and sonar runner for Jenkins?

like image 82
Fabrice - SonarSource Team Avatar answered Oct 05 '22 03:10

Fabrice - SonarSource Team