Sonar Can't Read my lcov.info

Hi there,
Just use sonar for a couple of months.
I wonder, how to make sonar read my lcov.info file?
this is my pipeline setup on bitbucket

- pipe: sonarsource/sonarcloud-scan:1.2.0
        variables:
          SONAR_TOKEN: ${SONAR_TOKEN}
          XTRA_ARGS: '-Dsonar.sourceEncoding=UTF-8 -Dsonar.sources=src -Dsonar.tests=tests -Dsonar.test.inclusions="**/e2e/*.js" -Dsonar.javascript.lcov.reportPaths=coverage/lcov.info -Dsonar.coverage.exclusions=build/** -Dsonar.javascript.node.maxspace=4096'

thanks in advance

Hi @baradana and welcome to the community !

Well with the xtra args, it should work. What said the logs ? is the file not found, or no content has been read inside ?

Mickaël

Hi thanks @mickaelcaro for replied
I got logs from my pipeline like this:
WARN: Too many duplication references on file…xxx

It is the issue that why my lcov can’t read inside sonar?

I don’t think so. Would it be possible for you to share those logs, preferably with debug mode enabled ? (i can send you a PM if you want to share them privately, let me know)

Thanks in advance.

Yes please, can I send a PM?

Hi @mickaelcaro FYI, after PM discussion, thank you for your time to help me found out my issue.
I just figure it out, that path on Mac and inside the pipeline which is Linux, it is not same.
So, I just fixed it, and now it running well.
Thanks your for your help.

Hi @baradana

Thanks for letting me know, and glat it works !

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.