Okay, looking into our SonarCloud settings it seems like something cleared out our typescript settings from SonarCloud, so it no longer was picking up the coverage file for any of our typescript code.
I have since updated our yaml task to include the setting in the extra properties, so that for whatever reason it got cleared out of our sonarcloud settings it will not happen again.
extraProperties: |
sonar.javascript.lcov.reportPaths=App_Test/Coverage/lcov.info
This after applying this change the PR reported that the code coverage would be set back to what it was before.
However this has somehow broken most of our C# coverage.
Frankly, I’m at a bit of a loss at a few things:
- Why did the Typescript coverage setting disappear from our SonarCloud settings?
- Why has our C# coverage suddenly plummeted. It seems like it is no longer picking up the coverage results in the Visual Studio format that it used to retrieve automatically.
In the addition to adding the additional property, I also updated the Visual Studio tasks as it appears to support a different format now:
From this:
- task: SonarSource.sonarcloud.14d9cde6-c1da-4d55-aa01-2965cd301255.SonarCloudPrepare@1
displayName: Prepare analysis on SonarCloud
inputs:
SonarCloud:#name
organization: 'wsi-xceptor'
projectKey: #key
projectName: #name
To this:
- task: SonarCloudPrepare@1
inputs:
SonarCloud: #name
organization: #org
scannerMode: 'MSBuild'
projectKey: #key
projectName: #name
extraProperties: |
sonar.javascript.lcov.reportPaths=App_Test/Coverage/lcov.info
Is there any way this could have had an impact? I would have expected that it should not.