sonar-scala / sbt-sonar

An sbt plugin which provides an easy way to integrate Scala projects with SonarQube.

Home Page:https://sonar-scala.com/docs/setup/sbt-sonar

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Scapegoat analysis results not captured in SonarQube

goldsworthy opened this issue · comments

I took the multi-module test project and added code which successfully triggered ScapeGoat. However, this information was not pushed up to SonarQube. I would expect to see the warnings under code smells, as I do for ScalaStyle issues.

https://github.com/mwz/sbt-sonar/tree/master/src/sbt-test/sbt-sonar/multi-module

I'm running SonarQube 6.7.5

Hi @goldsworthy, we're aware of an issue with the scapegoat sensor and multi module projects, which we're tracking in sonar-scala project (sonar-scala/sonar-scala#92). Please keep an eye on this issue - I'm hoping to fix it pretty soon.

Here is the hotfix sonar-scala/sonar-scala#96 - I should be able to release it relatively quickly once the PR gets reviewed.

Hi @goldsworthy, would you be able to give 6.5.1 a try and let us know if that fixes the issue for you?

@mwz I installed the 6.5.1 plugin and tested this with the example project and my own project. I'm not seeing the scapegoat information in SonarQube for either project. Please let me know if there is any other information I can provide.

Hi @goldsworthy, that's strange

Could you provide us with the debug logs of the test project run.

@goldsworthy I think I found your problem.

If you were using the old scapegoat plugin those rules are no longer valid, since this is a new plugin, so you should update your quality profile.

PS: If you want you can use the default Scapegoat quality profile that the plugin provides, just for testing 😉

Hope it helped 👍.

@mwz @BalmungSan I can confirm this is working properly - your help and responsiveness is greatly appreciated!

That's excellent, I'm glad we got to the bottom of it - thanks @BalmungSan for jumping in!

@goldsworthy, the best thing you can do for now is to create a new profile with scalastyle and scapegoat rules (if you want to use both). In the near future, we're planning to provide both a combined profile (Scalastyle + Scapegoat) along with a recommended profile, so this should be easier to set up.

It also looks like SonarSource will be working on official support for Scala later this year, so watch out this space.