Code coverage for a new language

I have recently managed to create a SonarQube analyzer for an other language inspiring myself from SonarPython so the structure is almost the same. However, in the overview, I always have a 0% coverage, but my lines are tested because it detects code smells or bugs in my code.
I’ve looked into it and I found this :

I don’t understand where I should put this, so if you have any suggestions, I’ll be happy to listen to it !

Sorry, I don’t understand that.
There may be a misunderstanding about “code coverage” here.
Do you have unit tests for the project you analyze?

Thanks for your answer ! I have unit tests yes. Actually, I must have missed an installation or something, because when I use SonarPython, I don’t get any code coverage as well. Do you have an idea of what it could come from ?
I read that I should install jenkins on my computer and download some sonarqube plugin on it.

SonarQube doesn’t compute coverage by itself, it aggregates coverage data coming from other tools.

For python, you can use and have it generate an XML report for the project you want to analyze. You can then import this report using sonar.python.coverage.reportPaths as described in the documentation.

You don’t need Jenkins to do that.

1 Like