Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SonarCloud Integration #374

Open
TobiasDuswald opened this issue Mar 10, 2022 · 3 comments
Open

SonarCloud Integration #374

TobiasDuswald opened this issue Mar 10, 2022 · 3 comments

Comments

@TobiasDuswald
Copy link

Dear developers,

the project description points out that kcov supports the integration with SonarSource products, specifically with SonarCube. The documentation for this feature is rather basic and given in this file. The referenced plugin is officially deprecated. I wondered if you know if it's possible to use kcov in combination with SonarCloud which belongs to the same family of products of the same company? The instuctions file above mentions a file sonarqube.xml that should appear in the output but if I run kcov on our project this file does not appear. Are there specific options that must be used to create that file?

Sorry the question is not as structured as I'd like it to be but any help in the direction of using kcov's output for SonarCloud's coverage would be much appreciated.

Thank you very much!

Tobias

@SimonKagstrom
Copy link
Owner

SimonKagstrom commented Mar 10, 2022

I haven't used SonarCube for the last couple of years, so that support has probably rotted away.

Looking at your link, it appears to support cobertura output through

sonar.flex.cobertura.reportPaths

and kcov generates cobertura XML in path/to/output/binary/cobertura.xml

This is probably the way to go for SonarSource / SonarCloud support.

Edit: Assuming it works for other languages than Flex.

@TobiasDuswald
Copy link
Author

Dear @SimonKagstrom,
I gotta apologize - I somehow missed the presence of the sonarqube.xml in kcov's output directory. It's indeed still there and the output format has not changed over the past years, i.e. your sonarcube.xml format is perfectly well understood by SonarCloud. So for other kcov users using SonarCube / SonarCloud, it's sufficient to direct SonarCloud to the sonarcube.xml file, e.g. specify

# Coverage reports
sonar.coverageReportPaths=build/coverage/coverage_data/sonar_coverage.xml

with the path suitably modified. We introduced coverage reporting in PR 247 of our repository. Maybe that is helpful.

Thanks again for your help Simon!

@SimonKagstrom
Copy link
Owner

Good to hear!

I guess the documentation needs some updating though :-). I'll try to come up with something based on your comment above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants