- Local Sonar Version - Community Edition Version 7.9.2 (build 30863)
- Hosted Sonar Version - Version 7.0 (build 36138)
- Sonar Scanner 4.0.0.1744
- SonarJS/TS - 6.2 / 2.1
- Sonar NPM Module - 2.5.0
Between March 6th and Today, our pipeline is no longer reporting code coverage - either in full or on new code.
We have a multi-module setup for an Angular project that has a root properties file and uses the multi-module for each library and app shipped from this repo
Nothing has changed in our configuration files, but we are now observing the following message in the sonar output:
INFO: Analysing [/Users/tpiper1/work/frontend/core-frontend/libs/core/auth-core/../../../coverage/libs/core/auth-core/lcov.info]
WARN: Could not resolve 7 file paths in [/Users/tpiper1/work/frontend/core-frontend/libs/core/auth-core/../../../coverage/libs/core/auth-core/lcov.info], first unresolved path: libs/core/auth-core/src/lib/auth-core.module.ts
The main sonar file is:
sonar.projectKey=core:frontend
sonar.projectName=Core Frontend
sonar.exclusions=**/node_modules/**/*, **/*.spec.ts, **/*.e2e.ts, **/environments/**/*, **/*.routes.ts, **/main.ts, **/test-setup.ts, **/polyfills.ts
sonar.test.inclusions=**/*.spec.ts
sonar.sourceEncoding=UTF-8
sonar.typescript.tsconfigPath=tsconfig.json
sonar.host.url=http://localhost:9000 # Normally the remote URL
sonar.modules=api-core,auth-core,utils-core,demo-app
api-core.sonar.projectBaseDir=libs/core/api-core
auth-core.sonar.projectBaseDir=libs/core/auth-core
utils-core.sonar.projectBaseDir=libs/core/utils-core
demo-app.sonar.projectBaseDir=apps/demo/demo-app
An example submodule would be:
sonar.projectName=Utilities Core
sonar.sources=src
sonar.tests=src
sonar.typescript.lcov.reportPaths=../../../coverage/libs/core/utils-core/lcov.info
If I change to sonar.typescript.lcov.reportPaths
to sonar.javascript.lcov.reportPaths
I don’t get the above issue, but there is still zero coverage.
INFO: Sensor SonarTS [typescript]
INFO: Analyzing 11 typescript file(s) with the following configuration file
/Users/tpiper1/work/frontend/core-frontend/libs/core/auth-core/tsconfig.json
INFO: 11 files analyzed out of 11
INFO: Sensor SonarTS [typescript] (done) | time=3634ms
Current