GithubHelp home page GithubHelp logo

Comments (6)

joelvim avatar joelvim commented on July 20, 2024 1

Out of curiosity, are you using the official SonarQube's SonarScala plugin or our community driven sonar-scala? I remember there were some issues with using the base dir setting in sonar-scala, but I can't quite remember where I left this - I'll check that.

I was testing in local with mwizner/sonarqube-scala-plugins docker image, but the deployed sonar is an old 6.7 community with only the standard scala plugin. I will later see if we can upgrade and use sonar-scala plugin.

That's quite an unconventional setup you have there with modules in subdirectories, is there any particular reason why you have your project set up that way?

The original reason was because we have > 50 modules in our repo, and it was a way to avoid having all with directories at root, so it was easier to work with it.

Yes, I agree with you that it would be useful to populate sonar.modules and moduleName.sonar.projectName automatically, maybe it's something that could be automated.

I spent some time trying to do it but I didn't succeed. Even when I put all my modules in a list and tried to transform them as the correct sonar properties, I encountered sbt errors that were away of my sbt dev knowledge 😄

from sbt-sonar.

joelvim avatar joelvim commented on July 20, 2024

If we configure each module projectBaseDir on main module, it works.
It would be awesome if there was a boolean setting that allowed user to choose if he want this to be done automatically, because doing this by hand is not maintainable when you have a lot of modules (50 in my case)

However, I don't know how, with sbt API, you can get, for a project, all its aggregated project, and get their id and base path in order to build the correct sonar configuration :'(

from sbt-sonar.

mwz avatar mwz commented on July 20, 2024

Hi @joelvim, thanks for opening this issue and for the PR - I'll try to have a closer look later today or tomorrow.

Out of curiosity, are you using the official SonarQube's SonarScala plugin or our community driven sonar-scala? I remember there were some issues with using the base dir setting in sonar-scala, but I can't quite remember where I left this - I'll check that.

That's quite an unconventional setup you have there with modules in subdirectories, is there any particular reason why you have your project set up that way? You could probably save yourself the extra trouble with the base dir property if you had it set up in a more conventional way.

It would be awesome if there was a boolean setting that allowed user to choose if he want this to be done automatically, because doing this by hand is not maintainable when you have a lot of modules (50 in my case)

Yes, I agree with you that it would be useful to populate sonar.modules and moduleName.sonar.projectName automatically, maybe it's something that could be automated. Let me have a look into that and review your PR and I'll get back to you.

from sbt-sonar.

mwz avatar mwz commented on July 20, 2024

Thanks again for the PR, I've merged the changes and will release a new version shortly.

Regarding populating properties for all modules automatically I think there is a way in sbt to get a list of projects which are aggregated by the current project, but I'm not sure how to go from a project reference to getting settings of that project; worth asking on sbt's gitter channel, maybe someone can point you in the right direction.

from sbt-sonar.

mwz avatar mwz commented on July 20, 2024

Released as v2.3.0, should be in maven central shortly.

from sbt-sonar.

joelvim avatar joelvim commented on July 20, 2024

Thank you very much for the merge and the release. I didn't think about asking on the gitter channel, maybe it could help.

from sbt-sonar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.