Comments (6)
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.
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.
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.
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.
Released as v2.3.0, should be in maven central shortly.
from sbt-sonar.
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)
- Support Server authentication token HOT 3
- scripted tests are broken
- java.lang.IllegalAccessError: class org.sonarsource.scala.checks.DuplicateBranchScalaCheck$$Lambda$5577/0x00000008020cdb00 HOT 2
- Plugins ignore some properties HOT 1
- Accept system properties when using an external config (sonarUseExternalConfig)
- Improved usage/getting started documentation HOT 5
- The 'sonar.scala.version' is not properly set or is missing HOT 3
- Add 'sonar.tests' property
- Settings with Subprojects HOT 1
- Analyze with Sonar also Java sources
- I have lots of unresolved dependencies HOT 2
- sbt analogue for `mvn sonar:sonar -Dsonar.host.url=http://localhost:9000` HOT 7
- scoverage report upload doesn't work HOT 10
- Have you seen this? HOT 1
- Non-zero exit with RuntimeException after successfully uploading the report HOT 2
- sonar.scala.scoverage.reportPath not honored HOT 1
- Show specific failed test in sonar UI HOT 1
- Issue when pushing to upstream branch due to OverlappingFileLockException HOT 4
- sonarScan ignoring report path properties
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sbt-sonar.