Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"This project is empty" error in Sonarqube

Tags:

c#

sonarqube

I have configured a C# project in Sonarqube. After analysis is done, I can see the below screen on the dashboard for the project "CsprojFromCs".

Dashboard

When I click on the project name and go to the details page, it shows me "This project is empty" as below.

Error Message

My C# project contains two files and I am able to run it correctly. Why is it showing "This project is empty" in the overview tab?

Below is the snapshot of the analysis.

1."C:\SonarScanner.MSBuild.exe" begin /k:"CsprojFromCs" /d:sonar.host.url="http://localhost:9000" /d:sonar.login="e1295f619c7ff6f08f974f5a18141b999e830610"

Output:

enter image description here

2.Command: MsBuild.exe /t:Rebuild

Output: enter image description here

3.Command: "C:\SonarScanner.MSBuild.exe" end /d:sonar.login="e1295f619c7ff6f08f974f5a18141b999e830610"

Output:

enter image description here

like image 830
Parashuram Avatar asked Nov 02 '18 17:11

Parashuram


People also ask

What is SonarQube error?

There are three types of issues: Bug – A coding mistake that can lead to an error or unexpected behavior at runtime. Vulnerability – A point in your code that's open to attack. Code Smell – A maintainability issue that makes your code confusing and difficult to maintain.

How do I import a project into SonarQube?

Go to the Project's Home Page and choose Project Settings > Import / Export. Click on the Import button to start importing your data. Source code is not included in the zip file. Once the import is finished, trigger an analysis to import source files into the new instance.

What is project key in SonarQube?

projectKey is simply the unique identifier of your project inside SonarQube. You are free to choose whatever you want, as long as it is unique. Analysis Parameters is the official documentation page from Sonar, where you can find additional information about all the properties.


1 Answers

The problem is that the SCM plugin wrongly ignore all the files. Disabling the SCP plugin solves the issue.

To disable SCP use sonar.scm.exclusions.disabled=true analysis parameter.

like image 191
Tenusha Guruge Avatar answered Sep 24 '22 16:09

Tenusha Guruge