- ALM used : Azure DevOps
- CI system used : Azure DevOps
- Scanner Azure DevOps task version : 3.1.1
- Languages of the repository : Mono repo with C# and Angular / Typescript, only scanning for Typescript.
Since migrating from SonarCloudPrepare@2
to SonarCloudPrepare@3
we noticed that the analysis is not able to find the lcov files.
We are using NX so there are multiple lcov files, we need the wildcards to gather them all.
We did not change the configuration between v2 and v3 of the task
Command with relevant parameters :
- task: SonarCloudPrepare@3
displayName: "Prepare UI analysis on SonarCloud"
inputs:
workingDir: "Front"
SonarCloud: "*****"
organization: "****"
scannerMode: cli
configMode: manual
cliProjectKey: ****
cliProjectName: ****
cliProjectVersion: ****
extraProperties: |
sonar.projectBaseDir=$(Build.SourcesDirectory)/Front
sonar.javascript.lcov.reportPaths="**/Front/coverage/**/lcov.info"
Before v3 the command was exactly the same
The result was:
...
Sensor JavaScript/TypeScript Coverage [javascript]
Analysing [C:\a\10\s\Front\coverage\apps\******\lcov.info, C:\a\10\s\Front\coverage\libs\*******\lcov.info, ...]
...
Now, with v3, the output is:
Sensor JavaScript/TypeScript Coverage [javascript]
No LCOV files were found using C:\a\4\s/Front/coverage/**/lcov.info
No coverage information will be saved because all LCOV files cannot be found.
Sensor JavaScript/TypeScript Coverage [javascript] (done) | time=1757ms
I checked, the files lcov are there.
If I change the reportPaths
to target a specific file.:
sonar.javascript.lcov.reportPaths="$(Build.SourcesDirectory)/Front/coverage/apps/my-apps-folder/lcov.info"
It finds it properly :
Sensor JavaScript/TypeScript Coverage [javascript]
Analysing [C:\a\10\s\Front\coverage\apps\my-app-folder\lcov.info]
Could not resolve 6 file paths in [C:\a\10\s\Front\coverage\apps\my-apps-folder\lcov.info]
First unresolved path: apps\my-apps-folder\src\app\analysis\services\********.ts (Run in DEBUG mode to get full list of unresolved paths)
Sensor JavaScript/TypeScript Coverage [javascript] (done) | time=61ms
My conclusion is that there seems to be a breaking change with the wildcard handling, it doesn’t seem to understand it anymore.
Any suggestion ?