- which versions are you using:
- SonarQube 9.9 LTS Enterprise
- gradle plugin:
4.0.0.2929
- sonar-scanner:
5.0.1.3006
- how is SonarQube deployed: Docker
- what are you trying to achieve:
Thanks in advance for your help. I have a two project mono repo with GitHub PR decoration. I’m trying to configure the projects so that when a change is made to just one SQ project the repository PR only gets one decoration. Currently the PR receives two decorations for a change that is specific to one project. The decoration for the project with no change shows no files changed.
Other Info:- In my setup, one of the projects uses the gradle java plugin while the other uses the sonar-scanner binary.
- The java project lives under
src/
- the sonar-scanner project (JS frontend) lives under
ui/src
. - In the above scenario, a change was made to the JS project (the PR decoration shows the correct modifications in SQ) but the PR decoration for the java app shows no changes.
- what have you tried so far to achieve this:
- I have followed the PR decoration instructions for GitHub and enabled the mono repo toggle on both SQ projects.
- I have configured Source File Inclusions on each project to use the appropriate sources directory within SQ.
- On the scanner side, the gradle plugin is configured to only use java sources and the sonar-project.properties has
sonar.sources
configured for the JS source directory
Any thoughts on other things to try to get this working would be appreciated.
sonar-project.properties
sonar.projectKey=app-ui
sonar.projectName=app-ui
sonar.sources=ui/src/
sonar.javascript.lcov.reportPaths=ui/coverage/lcov.info
sonar.sourceEncoding=UTF-8
sonar.coverage.exclusions=**/index.ts
sonar.exclusions=**/*.d.ts, \
**/*.test.*, \
**/*.scss, \
node_modules/**, \
dist/**, \
playwright/**, \
playwright-report/**
gradle configuration
sonar {
properties {
property 'sonar.projectKey', "app"
property 'sonar.projectName', "app"
property 'sonar.sources', "src/main/"
property 'sonar.coverage.jacoco.xmlReportPaths', "build/jacoco/aggregated/jacoco.xml"
}
}