Hey Guys analysis id “AXV6YCwE6ZXbWzyafjiM” keeps on showing incorrect coverage metric in sonar cloud.
And it considers test files as source file and coverage metrics as 0%. ceTaskUrl=https://sonarcloud.io/api/ce/task?id=AXV6YCgG16vwjXHqITYK
We are not able to figure it out atm.
Would request some community support.
It’s a private repository with a paid sonar cloud subscription.
SonarCloud and the Sonar scanner try to detect automatically source and test files. It seems the automatic way don’t fit your project structure, mixing tests and sources.
The analysis scope can be configured using the Analysis scope configuration documentation, to specify source and test file patterns to match your project.
Considering the coverage, my first guess is the coverage reports are not found. If your project structure is not appropriately supported by the automatic detection, then the scanner may not be reading the coverage reports at the right place.
Scala has a specific configuration option, sonar.scala.coverage.reportPaths, that can be used to override the default paths.