0

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

Ganesh Rao B
  • 461
  • 2
  • 8
  • 23
  • So why did you downgrade if it was working correctly with the latest version? – Fabrice - SonarSource Team Mar 24 '16 at 09:13
  • Need to downgrade because planned to use common sonar server across the organization.(Initially it was set up locally so used latest ,but in Main server it was lower version of sonar used ) – Ganesh Rao B Mar 24 '16 at 09:21
  • Well, if you want help, you will have to provide more details (like the logs of the analysis, the server log, the list of plugins, ...etc) because SQ 4.5 LTS is known to work perfectly, so you probably have a configuration issue, or a compatibility issue, or ... – Fabrice - SonarSource Team Mar 24 '16 at 10:01
  • Sorry for the late reply. One quick question which version of sonar scanner to be used for SonarQube 4.5 ? – Ganesh Rao B Mar 28 '16 at 01:53
  • Can you check if rules related to metrics are enabled in sonar? You have to specifically enable rules for them to work... Not sure but in sonar 5 they might have changed rule repo. – Shiva Mar 28 '16 at 04:16
  • metrics is enabled for sonar – Ganesh Rao B Mar 28 '16 at 06:06

2 Answers2

0

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)

Ganesh Rao B
  • 461
  • 2
  • 8
  • 23
0

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

Community
  • 1
  • 1