No coverage on project analyzed by Bitbucket pipelines

I have just integrated SonarCloud with Bitbucket pipelines,
however no coverage of code is showing up, even when I make a new pull request it flags the lines in red and states the following “Not covered by tests”.

Welcome to the community!

It seems the coverage reports were not included with the analysis. Please review the documentation about test coverage, and make sure that the relevant scanner properties are correctly set when you run the analysis.

Let me know if you need further help!

Hi @janos ,
thanks for the fast response.

can you give me an example of those proprieties in the yml file?

sorry but this is my second day working is this :smiley:

this is my bitbucket-pipelines.yml

Checkout the sonarcloud-scan README for some examples on setting sonar.* properties

- pipe: sonarsource/sonarcloud-scan:1.0.1
    EXTRA_ARGS: -Dsonar.projectDescription=\"Project with sonarcloud-scan pipe\" -Dsonar.eslint.reportPaths=\"report.json\"
1 Like

hey @Colin

I took a look at the readme, a implemented the variables.
however i still have the same result

I also saw this property sonar.php.coverage.reportPaths but to be honest im lost on how to implement the path or all the paths

…yes, those were just examples. You’ll want to pass the relevant analysis parameters from the Documentation @janos linked earlier.

@Colin do you guys by any chance have real examples? if not i’ll keep trying thank you

@Colin @goncalo_ribeiro

Just noticed this thread and we’re also having similar issues - no coverage is being reported Sonar Typescript Coverage Failing

I suggest to start with one path. Then observe the coverage increase. Multiple paths can be separated by comma. I suggest to add paths one by one, and observe the coverage to increase every time. Once you’re confident, add all the paths.

hey @janos

i was able to move foward a little, now currently having this error

this is my pipeline config

Can you share the content of the file? From the error output it looks like it might contain CSV data instead of XML.