Technical Debt showing Zero in Sonar - jenkins

I am using Jenkins for CI and added the sonar plugins for Jenkins. After sonar scan Technical Debt shown Zero.
But actually its is not zero previously was using latest version of sonar there it was showing Technical Debt but after downgrading it is not shown .(Duplicate code ,Lines of code ,complexity are shown)
Below are the version of sonar used
Before Downgrading following version are used (Working fine)
sonar scanner 2.5.1 , Sonar Plugin 2.3 , SonarQube 5.4 , Jenkins version. 1.651
After Downgrading (Technical Debt not shown)
Sonar scanner 2.5, sonar plugin 2.1 , SonarQube 4.5 , Jenkins version 1.651
How this problem can be solved ?
Thanks
Ganesh

I found the reason for this , posting here so that it can be helpful for others.
In latest version of SonarQube 5.4 there is no need to refer to 'binaries' ,from 'src' only Technical Debt will be calculated.But in case of older version 4.5 need to refer binaries also for sonar scan(Because find-bugs requires binaries in new one find bugs are integrated to sonar way profile)

I had the same problem, I missed deleting data/es folder during upgrade process. After deleting the data/es folder and restarting the sonarqube server solved my problem. More information is here

Related

File does not exist in SonarQube analysis

When analyzing C# project with TFS 2015 vNext build, I get the following error:
The folder
'D:\Builds_Agent1_work\4\s\System\IPS\Files\Logo\MasterDesigns\Logo_11_Seal_of_Pinellas_County'
does not exist for
'DEV_ScriptAdvisorPBM_SonarQube:DEV_ScriptAdvisorPBM_SonarQube:9C5E1BB5-E446-45C8-9CE6-5F9896D0D063'
(base directory = D:\Builds_Agent1_work\4\s\System\IPS)
I think it's because there is a file called "Logo_11_Seal_of_Pinellas_County,_Florida.png" but SonarQube thinks it's "Logo_11_Seal_of_Pinellas_County".
I tried /d:sonar.exclusions=**\MasterDesigns\* to ignore the entire directory where "Logo_11_Seal_of_Pinellas_County,_Florida.png" is located but still same error.
Any suggestions to fix this issue? Thx.
SonarQube 6.5 C# plugin.
This bug is tracked by SONARMSBRU-199 which was fixed in the Scanner for MSBuild v4.1.
The bug report as mentions a workaround for excluding a single file.
FYI support for MSBuild 12 was dropped in the Scanner for MSBuild v4, so if you upgrade the version you will need to make sure you are using a compatible version of MSBuild.

With Java 8 which version of sonar-ant-task need to be used?

I am using ant script for Sonar code scan .Currently with 'sonar-ant-task-2.2.jar' i am able to execute scan for Java 7.
With Java 8 which version of sonar-ant-task need to be used ?
Thanks & Regards
Ganesh Rao
Read point #2 of Prerequisites at documentation. Use At least the minimal version of Java supported by your SonarQube server is in use.
See this, any JRE v8 will do.
If you have a look at the documentation of the latest scanner you will find this Prerequisites section:
SonarQube is already installed
At least the minimal version of Java supported by your SonarQube server is in use
The language plugins for each of the languages you wish to analyze are installed
You have read Analyzing Code Source.
Ant 1.7.1 or higher
So using Java 8 is not a problem if you are using SonarQube 5.6+ and using the latest scanner will resolve some issues (see the changelog).

Fail to execute sonar PMD

We are using sonar 4.5.1 and sonar-pmd-plugin is 2.3. From last few days , I am facing issue of "too many open files " Fail to execute PMD. Following file is ignored. I found that issue is fixed in 2.4 but we cannot upgrade the plugin as it would also need upgrade to Sonar 4.5.2 version. Is there any fix or workaround for the issue ? Kindly help. We use Jenkins 1.580, Sonar 4.5.1,Maven 3.0.4.

which version of sonarqube for depereciated delphi plugin?

I want to use the Delphi plugin for SonarQube, but apparantly it is depreciated. Hence, I would like to install an old version of SonarQube to use it. My 2 questions:
- which version of SonarQube should I use?
- where can I donwload the latest version of the Delphi plugin?
Thanks a lot and regards,
Pieter
We tested and is running the current version of Sonar:
Compatible with SonarQube 4.5.x and SonarQube 5.1.2
https://github.com/fabriciocolombo/sonar-delphi
Release: https://github.com/fabriciocolombo/sonar-delphi/releases
JAR: https://github.com/fabriciocolombo/sonar-delphi/releases/download/0.3.3-SNAPSHOT/sonar-delphi-plugin-0.3.3-SNAPSHOT.jar
PS: Translated from Portuguese to English by Google Translate.
take a look here:
https://github.com/darianmiller/devmachine/wiki/Delphi-Example-Project-for-Sonar
I'm using delphi plugin 0.2 with sonar 3.5.1

Jenkins maven builds fail with 0ms

We recently migrated jenkins to the LTS version 1.532.2. Ever since, we have been experiencing problems with maven builds failing frequently and claims the entire build took only 0ms as seen in the build trend.
The maven project plugin itself wasn't upgraded as he latest version had a different issue. The current maven project plugin in use is 2.0
Has anyone experienced this behavior?

Resources