RadoBuransky / sonar-scoverage-plugin

Sonar plugin for Scala statement coverage tool
GNU Lesser General Public License v3.0
75 stars 31 forks source link

No report data uploaded to sonar server #33

Open mikail-khan opened 8 years ago

mikail-khan commented 8 years ago

Hi,

I'm having an issue where the scoverage report data is not being uploaded to SonarQube.

Here is the sequence of steps I followed:

  1. I installed the scoverage sonar plugin on SonarQube and restarted the server
  2. I installed Sonar Scanner and pointed it to the to SonarQube
  3. I ran sbt clean coverage test
  4. I then ran sbt coverageReport to generate the report
  5. All the data is produced. I can see this locally by just bringing up the data in a browser
  6. I set the config properties for sonar-runner
  7. I run sonar-runner
  8. It says it completes successfully but when I go to sonar I see the project there but there is no data and no code.

I can't think what the issue could be. I then downloaded your sample sbt project and ran that. I got the following message:

INFO: Publish mode INFO: ------------- Scan module1 INFO: Language is forced to scala INFO: ------------------------------------------------------------------------ INFO: EXECUTION FAILURE INFO: ------------------------------------------------------------------------ INFO: Total time: 7.846s INFO: Final Memory: 41M/101M INFO: ------------------------------------------------------------------------ ERROR: Error during SonarQube Scanner execution ERROR: You must install a plugin that supports the language 'scala'

Why is SonarQube Scanner asking for a Scala plugin? I know you specified that the sonar.language=scala but really I am not asking it to do any static analysis as that has already been done by scoverage. All it should do it is upload the report in way SonarQube can understand.

hcwilhelm commented 8 years ago

+1 I am experiencing the same problem, I don't know where to download the language plugin for scala.

mikail-khan commented 8 years ago

The plugin is here: https://github.com/RadoBuransky/sonar-scoverage-plugin

But sonar-scanner/runner does not recognise it.

hcwilhelm commented 8 years ago

Yes exactly, but the sonarqube server dose recognize it. At least it is listed unter the plugin section in the config view.

mikail-khan commented 8 years ago

That plugin is installed on the SonarQube server so obviously it is aware of it. When I run the Sonar Scanner/Runner it finds this plugin and pulls it down. However, for some reason, the Scanner/Runner still complains that it needs a Scala plugin even though it has pulled it down.

For what it's worth, I have switched to Coveralls. It took 5 mins to setup and get the information loaded.

vromancas commented 8 years ago

+1 I'm experiencing the same issue

aborsu commented 8 years ago

Hello, I had a lot of problems setting up sonar for scala analysis and using it with scala 2.11.8. In the end I created a basic scala sensor myself and pulled the code both from sonar-scalastyle and here to make a single install jar. It's sill very much a work in progress but it is much easier to setup. https://github.com/Sagacify/sonar-scala

erfangc commented 8 years ago

+1 same here, the results of scoverage does not appear to be uploaded to SonarQube properly

Using sonar-scoverage-plugin#v5.1.3 against SonarQube v5.5 on Scala 2.11.8

Darwin macbook 15.4.0 Darwin Kernel Version 15.4.0

rehanone commented 8 years ago

I have exactly the same problem, is there a fix or workaround available or any fix for it planned?

broilogabriel commented 8 years ago

+1 I tried several times and no luck, the scoverage report is never shown in Sonarqube

RobotLimeLtd commented 7 years ago

Same problem here with Sonar 5.6. Absolutely no mention of scoverage in Sonar's output, nor any errors. No coverage shows up in Sonar. The plugin shows as installed in Update Center.

thilaksatish commented 7 years ago

Hi,

Is there any update on this? I'm running into the same issue where reports are generated but nothing gets displayed on Sonar.

Below are my sonar configs. sonar.projectKey=com sonar.projectName=test sonar.projectVersion=1.0 sonar.sources=${WORKSPACE}/src/main/scala sonar.tests=${WORKSPACE}/src/test/scala sonar.core.codeCoveragePlugin=scoverage sonar.analysis.mode=publish sonar.scoverage.reportPath=${WORKSPACE}/target/scoverage.xml

I also customized sonar dashboard to include Statement coverage widget but still nothing gets displayed.

SonarQube version: 5.4 Jenkins version: 2.43

I installed Scoverage plugin on Jenkins and the reports are displayed neatly on Jenkins.

Could you please tell me if I'm missing any sonar config?

Thanks.

rcrohit commented 7 years ago

first click on administartion

image

then u vil c option of setting click on drop down

image

then click on update centre there u find whwt software installed if scala is not there then move to Avilable and install that plugin and the restart that server hope so it works :)

Kuntesh commented 6 years ago

does anyone have updates on this? I'm still getting Caused by: You must install a plugin that supports the language 'scala' after running sonar-scanner on my scala project. I've followed all the required steps and have placed sonar-scoverage-plugin-5.1.3.jar under sonarqube-7.2/extensions/plugins folder. Currently, I'm using sonarqube-7.2, sonar-scanner-3.2, scala-2.11. Is there anything that I'm missing? Any help/ guidance is appreciated.

Thanks