Why all new lines are uncovered in sonarcloud, when analysis/code coverage is high

using sonarcloudanalysis task (exec on dev/main branch only) on azure pipeline.
cobertura coverage report from karma junit reporter is getting published (with 70%) - see screenshot for lines covered
Its not getting synced/displayed in dashboard.
It shows all the new lines are yet to be covered.

PublishCodeCoverageResults@1 task has
summaryFileLocation: ‘$(System.DefaultWorkingDirectory)/$(projectbasefolder)/coverage/masters/cobertura-coverage.xml’

should the “sonar.cobertura.reportPath” in extraProperties of task: SonarCloudPrepare@1
have the same or the index.htm path?

Env details:
Node.js ‘18.16’
quality policy is set for both new and old code.
scannerMode: ‘CLI’
configMode: ‘manual’

Hi,

Welcome to the community!

That’s not a parameter I recognize. And what language is this for? We only support Cobertura-format reports for Flex and Python.

 
Ann

its for typescript (mentioned it as one of the tags) - what format to be used for this?

why does the loc differ? in pipeline task I see 2.4k; sonar coverage graph shows 2.2k only;
if sonar doesnt do anything related to code coverage on it own, how does this differ?
from where does it collect these details?
are they referring to diff sources/repo?
but how ‘last analysis’ is getting updated once I complete pipeline run?

Hi,

The supported coverage formats are listed in the docs I linked above.

That’s a whole lot of new questions. We try to keep it to one topic per thread. Otherwise it can get messy, fast. So please create a new thread for each additional question you’d like to pursue.

 
Ann

though they are new questions, arent they relevant to the topic? How can anyone track the solution if only one question is answered per topic? how can we get solution with just one question?