Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 07:49
    scala-steward commented #689
  • 07:49
    scala-steward closed #689
  • 07:49
    scala-steward opened #837
  • May 19 22:42
    scala-steward closed #750
  • May 19 22:42
    scala-steward commented #750
  • May 19 22:42
    scala-steward opened #836
  • May 18 21:45
    Yasinsac starred sonar-scala/sonar-scala
  • May 15 17:59
    mwz closed #681
  • May 15 17:58
    mwz closed #834
  • May 15 17:58
    mwz commented #834
  • May 15 01:37
    scala-steward closed #832
  • May 15 01:37
    scala-steward commented #832
  • May 15 01:37
    scala-steward opened #835
  • May 11 12:19
    shafemoh opened #834
  • May 10 23:41
    mwz commented #786
  • May 10 23:40
    mwz commented #831
  • May 10 22:52

    mwz on master

    Update README (compare)

  • May 10 22:44

    mwz on v9.0.0

    (compare)

  • May 07 19:07
    mwz closed #831
  • May 07 19:07

    mwz on master

    Bump to Sonar 9.4.0.54424 (#831… (compare)

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 :)
vtkachenko12
@vtkachenko12
Hi, All. I'm trying to use sonar-scala_2.13-8.7.0-assembly.jar plugin on sonar server 8.7.0.41497. When i put this plugin to /opt/sonarqube/extensions/plugins and restart sonar, I get following error: ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
java.lang.IllegalStateException: There are two languages declared with the same key 'scala' declared by the plugins 'scala' and 'sonarscala'. Please uninstall one of the conflicting plugins. Does anyone know how to fix this?
Yaroslav Derman
@yarosman
Hello. I want tol compile sonar-scala locally, but got error java.lang.NoSuchMethodError: 'scala.Option com.sksamuel.scapegoat.Inspection.explanation()'. How to fix it ?
Cédric Chantepie
@cchantep

Hi, I try to setup sbt-sonar on a multi-module project, but I encountered the following error:

[info] Loaded core extensions: developer-scanner
[info] Load project settings for component key: 'my-api'
[info] Process project properties
[error] stack trace is suppressed; run last api / sonarScan for the full output
[error] (api / sonarScan) You must define the following mandatory properties for 'my-api': sonar.organization
[error] Total time: 2 s, completed 6 janv. 2022, 19:26:44

The sonar.organization property is set, and I've tried to also set a property my-api.sonar.organization

Steven Barnes
@steven-barnes
Hello, I am trying to use sbt-sonar to do PR code analysis. We have community edition. I know the docs say that won't work, however I can do PR analysis using sonar-runner.
Does sbt-sonar support PR analysis?
Steven Barnes
@steven-barnes
I have gotten it to work on CLI, but now I have Concourse problems
Steven Barnes
@steven-barnes
I would appreciate any help... here is the problem. When using the plugin in concource, the PR branch is not being compared to develop, it is compared to itself. As a result there are no file differences, and the sonarqube analytics are useless. Is there any env var or config that might be overriding the parameters?
[info] SCM revision ID '99dac41b32b9818db1d523dc8a6d5878a2697f6d'
[info] SCM writing changed lines
[info] Merge base sha1: 99dac41b32b9818db1d523dc8a6d5878a2697f6d
[info] SCM reported changed lines for 0 files in the branch
log output:
Executing command line:
java
-Dfile.encoding=UTF-8
-Dsbt.repository.config=repositories
-Dsbt.override.build.repos=true
-Dsonar.projectKey=((project-name))
-Dsonar.host.url=((sonarqube url))
-Dsonar.sources=src/main/scala
-Dsonar.verbose=true
-Dsonar.scala.scalastyle.disable=true
-Dsonar.scala.version=2.13.3
-Dsonar.login=((redacted))
-Dsonar.pullrequest.key=302
-Dsonar.pullrequest.branch=BNC-950
-Dsonar.pullrequest.base=develop
-Dsonar.scala.coverage.reportPaths=target/scala-2.13/scoverage-report/scoverage.xml
-Xmx1048m
-Dsbt.log.noformat=true
-jar
/root/.cache/sbt/boot/sbt-launch/1.5.7/sbt-launch-1.5.7.jar
sonarScan
mwz
@m.wizner:matrix.org
[m]
Hi @steven-barnes, the official Pull Request analysis in SonarQube is available starting in Developer Edition (https://docs.sonarqube.org/latest/analysis/pull-request/), however our sonar-scala community plugin does support PR analysis in the Community edition, see more details on the website here - https://sonar-scala.com/docs/setup/pr-decoration and yes it does integrate with sbt-sonar as you can see in the example on the website.
mne8uy2
@mne8uy2
Since bintray is closed officially, where should be get the sonar-scala_2.13-8.5.0-assembly.jar ?
3 replies

Since bintray is closed officially, where should be get the sonar-scala_2.13-8.5.0-assembly.jar ?

@m.wizner:matrix.org

mne8uy2
@mne8uy2
@m.wizner:matrix.org Thanks for your reply. I will try it. Although if possible, could you try republishing it ?
It might help some organizations where sonarqube versions has limitations. And newer versions might not be compatible with them.
mne8uy2
@mne8uy2
@m.wizner:matrix.org , I tried but DockerFile with older versions are failing with same exception
1 reply
mwz
@m.wizner:matrix.org
[m]
@mne8uy2: the artifact is now attached to the release on GitHub
mne8uy2
@mne8uy2
@m.wizner:matrix.org Thank you
Stefano Salvatori
@ssalvatori
Hello
mne8uy2
@mne8uy2
Hi guys,
Is there any code duplication feature available ?
I want it with Sonar Report same like scapegoat.
mne8uy2
@mne8uy2
Hi @m.wizner:matrix.org how to get cpd and duplication report in sonarqube ?
2 replies
Valter Fernandes
@pfvalter_twitter

Hey you all. A bit of a noob with Sonar in general. I'm debugging why my reports aren't being uploaded. At the moment neither scoverage or scapegoat are being imported.
For scapegoat I see this message:

[2022-04-15T18:33:24.648Z] [info] 'Import of Scapegoat issues' skipped because one of the required properties is missing

For Scoverage I don't even have a clue. The reports are being printed correctly in the command line when the "coreverageReport" and "coverageAggregate" commands are called. but it ends there...

Valter Fernandes
@pfvalter_twitter
fixed all of the issues. I'll gladly help anyone that might need help with a similar issue.
Mehtab Mehdi
@mehtabnbu_twitter
hi
i need help to create the stage in my groovy script for checking the scala copde
code*