Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 14:41
    scala-steward closed #757
  • 14:41
    scala-steward commented #757
  • 14:41
    scala-steward opened #762
  • Oct 21 03:34
    scala-steward closed #755
  • Oct 21 03:34
    scala-steward commented #755
  • Oct 21 03:34
    scala-steward opened #761
  • Oct 18 21:13
    scala-steward closed #745
  • Oct 18 21:13
    scala-steward commented #745
  • Oct 18 21:13
    scala-steward opened #760
  • Oct 13 07:05
    angelcervera commented #134
  • Oct 12 23:45
    mwz closed #134
  • Oct 12 23:45
    mwz commented #134
  • Oct 12 16:59
    scala-steward closed #756
  • Oct 12 16:59
    scala-steward commented #756
  • Oct 12 16:59
    scala-steward opened #759
  • Oct 12 10:48
    scala-steward closed #746
  • Oct 12 10:48
    scala-steward commented #746
  • Oct 12 10:48
    scala-steward opened #758
  • Oct 11 06:15
    angelcervera commented #134
  • Oct 07 16:44
    scala-steward closed #754
Cosmin Ciobanu
@cosminci
I’m actually considering doing the same workaround rather than keeping the complexity in the pom. It’s particularly painful when you’re using extra scalac plugins as you need to maintain both a common configuration with the common set of arguments as well as particular configs for each execution with combine.children / combine.self properties to make sure maven merges everything as expected. Perhaps it’s better just to add an extra observation to the readme that explains why it’s mandatory to specify the scala:compile goal after the test goal. What do you think?
Also, any idea if, and if not - why, this problem does not manifest for sbt?
Michael Wizner
@mwz
no this problem does not exist in sbt
cerst
@cerst
Hi, is there any special local configuration required for sbt-sonar (2.1.1) to work with SonarQube 6.7?
When i run sonarScan against the docker container listed in the documentation everything works but i loose (at least) all coverage data when running against our 6.7 SonarQube.
Or does that mean that the server has an incompatible (plugin) version (referring to the sonar-scala compatibility matrix in the docs)?
cerst
@cerst
Nvm ... i guess the problem must be our SonarQube: I've re-tried integration against mwizner/sonarqube-scala-plugins:2.12.0-full (instead of latest) and everything still seems to work
Michael Wizner
@mwz
I can’t think of anything specific that would break things for the combination of sonar-scala 6.8.0, SonarQube 6.7.x LTS and sbt-sonar 2.1.1, but I haven’t tested that particular combination.
If you’re installing sonar-scala manually then check v6.8.0 against your SonarQube instance, that’s the version that’s bundled in the sonarqube-scala-plugins:2.12.0-full image.
Also I’d recommend migrating to the latest SonarQube LTS if you can as 6.7 is no longer supported.
cerst
@cerst
Thanks for the response!
Unfortunately, i can't do anything about the SubarQube version ...
However, i could fix the problem by adding the following sonarProperties entry to the root module of the multi module build:
"sonar.scala.coverage.reportPaths" -> sonarProperties.value("sonar.scala.scoverage.reportPath") (note that it is coverage.reportPath*s* instead of *s**coverage.reportPath)
In my case this causes a FileNotException during sonarScan because the root module has no sources and thus no coverage reports. But the coverage reporting now works.
I can't say why this works but maybe it'll help someone else ...
Michael Wizner
@mwz
Then it would appear that you’re using the SonarScala plugin rather than sonar-scala.
There is an incomplete PR in sbt-sonar (mwz/sbt-sonar#45) which attempts to make sbt-sonar compatible with SonarScala so that you don’t need to fiddle with those path properties. It hasn’t been finished off by the author, so if you’re keen to contribute it’s an easy one to pick up.
cerst
@cerst
I gave it a try: mwz/sbt-sonar#117
Michael Wizner
@mwz
Thanks @cerst!
Michael Wizner
@mwz
@/all sbt-sonar 2.2.0 was released with the ability to toggle compatibility between sonar-scala and SonarScala plugins.
cerst
@cerst
awsome, thanks for the quick release :)
adityamenongithub
@adityamenongithub
Hi All, I setup Sonarqube 8.4 and tried to install the sonar-scala plugin 8.4 version and it started to fail :( java.lang.IllegalStateException: Unable to read plugin manifest from jar : is there a way I can make sonar-scala 8.4 version work with the latest Sonarqube.
1 reply
Luis Miguel Mejía Suárez
@BalmungSan
@adityamenongithub it seems the plugin hasn't been updated for 8.4 yet, you may open a PR upgrading the dependency and fixing any build / test errors you find; I am sure Micahel will be grateful for that and release a new version ASAP.
Also, you can build that plugin locally and use it until the official release is done.
adityamenongithub
@adityamenongithub
Thanks for the reply @BalmungSan I'll try to give it a shot
Michael Wizner
@mwz
:+1:
adityamenongithub
@adityamenongithub
Hi @mwz since my SBT skill are the worst my friend @franbh helped me with the pull request for the new SonarQube compatibility with 8.4 mwz/sonar-scala-docker#28 I took the new jar file from https://dl.bintray.com/mwz/maven/com/github/mwz/sonar-scala_2.13/8.5.0/sonar-scala_2.13-8.5.0-assembly.jar and added it to the plugins directory with the same error java.lang.IllegalStateException: Unable to read plugin manifest from jar : /opt/sonarqube/extensions/plugins/sonar-scala_2.13-8.5.0-assembly.jar at org.sonar.updatecenter.common.PluginManifest.<init>(PluginManifest.java:125) at org.sonar.core.platform.PluginInfo.create(PluginInfo.java:412) at org.sonar.server.plugins.ServerPluginRepository.loadPreInstalledPlugins(ServerPluginRepository.java:135)
1 reply
Michael Wizner
@mwz
Hey @adityamenongithub, that's strange this issue wasn't happening for me when I tested it. What version of SonarQube are you using?
adityamenongithub
@adityamenongithub
Version 8.4.2.36762
Michael Wizner
@mwz
Ok thanks I'll have a look. What os are you running it on?
adityamenongithub
@adityamenongithub
I am running it on a CentOS 7 running it via a docker thou docker pull sonarqube:8.4.2-community
Michael Wizner
@mwz
Can you also double check that this jar is readable by the sonarqube user in line with other plugins?
adityamenongithub
@adityamenongithub
Sure, I'll take a look at that too, Thank you so much for your quick response :)
Michael Wizner
@mwz
No worries, let me know if the permissions are fine then I'll have a look at my end. Maybe the release got corrupted somehow.
adityamenongithub
@adityamenongithub
@mwz forgot to let you know about this, I couldn't get the jar working so I used the docker image https://hub.docker.com/r/mwizner/sonarqube-scala-plugins and looks like its working for me and seems like a better way than the jar. Thanks for your help
TATSUNO Yasuhiro
@exoego
Hello. Can sbt-sonar be used with SonarCloud instead of self-hosting SonarQube ?
Michael Wizner
@mwz
Hi @exoego, yes sbt-sonar can be used with SonarCloud. Setting sonarExpectSonarQubeCommunityPlugin to false allows you to switch compatibility from sonar-scala to SonarScala, which is the default Scala plugin available on SonarCloud. See the release notes for 2.2.0.
TATSUNO Yasuhiro
@exoego
@mwz Thanks !!
Michael Gumowski
@m-g-sonar
Hey there, I'm a developer at SonarSource, leading the development of the SonarJava analyzer.
Would it be possible to share a few words with the main maintainers of sonar-scala? :)
I've been trying to find an email address but didn't find anything adequate (and wanted to avoid linkedin in-messages)
@mwz maybe?
I'll stay around for a while, but feel free to contact me by email (michael.gumowski@sonarsource.com). We could also discuss directly through zoom or google hangout.
Cheers :)
Michael Wizner
@mwz
Hi @m-g-sonar, feel free to DM me and we can take it from there.
Michael Gumowski
@m-g-sonar
cool, thanks
mkonig
@mkonig
Hi. I want to use sonar-scala with scapegoat and maven. But scapegoat always fails the compile. I would love to just get a report, like with scoverage and scalastyle instead of a failing compile. Is this possible? On the web I only found the answer to use overrideLevels but that would mean I need to do this for each error, right?
Michael Wizner
@mwz
Hi @mkonig, you can do it per each inspection you want to override the level for or you can do it for all inspections at once, e.g. -P:scapegoat:overrideLevels:all=Warning. You need to be on v1.4.0+ for the latter to work.
mkonig
@mkonig
@mwz I guess the report will then only show warnings too. I am not sure if I want that for the feedback of the CI.
Michael Wizner
@mwz
Yeah, I generally prefer to override the level of specific inspections if I have to, although it's obviously recommended to not have any errors in a first place :smile:
Keep in mind that if you use sonar-scala, then the level of those inspections reported to SonarQube is determined by the levels set in your quality profile, so the local overrides don't really have any impact on your issues reported back other than just preventing Scapegoat from failing.
mkonig
@mkonig
@mwz Thanks. Good to know.
Sjors
@Taqas
Hi, I have multiple subprojects and I'd like to run a single sonarScan for the full project. Currently I can't get it to work, as it tries spin up a scan for every project. When ran individually like sbt "project sub-project-a" clean coverage test coverageReport sonarScan -Dsonar.sources=sub-project-a/src/main/scala -Dsonar.tests=sub-project-a/src/test/scala it does work, but I'd like to use the coverageAggregate. Any idea how?
mwz
@m.wizner:matrix.org
[m]
Hi @Taqas, you need to set aggregate in sonarScan := false on your aggregate project, see an example here: https://github.com/sonar-scala/sbt-sonar/blob/master/src/sbt-test/sbt-sonar/multi-module/build.sbt
Sjors
@Taqas
Thanks @mwz, it's working now. About the PR I created for the docs, I only see the coverage in SonarQube when I add the flag -Dsonar.scala.coverage.reportPaths=target/scala-2.12/scoverage-report/scoverage.xml, hence I thought about updating it
mwz
@m.wizner:matrix.org
[m]
This should work automatically, try setting sonarExpectSonarQubeCommunityPlugin := false and let me know if it doesn't work.
Sjors
@Taqas
Awesome, it's working, thanks a lot!
Ricardo Ruiz
@ricrui3
hi i'm trying to implement sonar-scala in my project and while doing so I found out that the repository of sbt-sonar is the old one here and here it has addSbtPlugin("com.github.mwz" % "sbt-sonar" % "2.3.0") but since v2.2.1 it is in: addSbtPlugin("com.sonar-scala" % "sbt-sonar" % "2.2.1") right? I fount out because while following the getting started page I was getting the error https://repo1.maven.org/maven2/com/github/mwz/sbt-sonar_2.12_1.0/2.3.0/sbt-sonar-2.3.0.pom
1 reply
sbtuser
@sbtuser:matrix.org
[m]
Hi I am trying to run a command using sbt shell, sonarScan -Dsonar.host.url=https://sonarqube.myhost.com
and I keep running into :[error] Expected whitespace character [error] Expected '/' [error] sonarScan -Dsonar.host.url=https://sonarqube.myhost.com
I reckon something needs to be formatted here; can someone help me out
Jean-François Côté
@JFCote
If anyway can check this one... sonar-scala/sbt-sonar#209
tagging @m.wizner:matrix.org if you are around. Thanks :)