coverlet-coverage / coverlet

Cross platform code coverage for .NET
MIT License
2.99k stars 385 forks source link

Support deterministic reports #1075

Closed MarcoRossignoli closed 4 months ago

MarcoRossignoli commented 3 years ago

Follow up https://github.com/danielpalme/ReportGenerator/issues/405

we could add a flag --deterministc-report and in case we're in a deterministic build use deterministic path instead of reconstruct the actual one.

cc: @clairernovotny @danielpalme

pinkfloydx33 commented 1 year ago

Any idea if/when OpenCover will get support?

MarcoRossignoli commented 1 year ago

We don't have any plan for the moment, the interest looks not so high, if you want you can take it and I'll review it.

pinkfloydx33 commented 1 year ago

Ok thanks, I'll have to take a look... We don't really need it, we just have an unfortunate setup.

We need Cobertura reports for Azure Devops. We also need OpenCover for Sonar Cloud which doesn't support Cobertura format. We want to migrate our builds/reports to fully deterministic; we've been purposely overriding/disabling determinism in CI test runs due to now fixed issues with ADO+report-generator. Up until now we've been generating both formats, but of course that fails with the deterministic reports enabled since OpenCover doesn't support the flag.

I haven't found a tool that can turn Cobertura reports into OpenCover, but report-generator can supposedly output lcov format which I think Sonar can accept. That might be a viable option for us and likely less effort than trying to add support here.

MarcoRossignoli commented 1 year ago

I haven't found a tool that can turn Cobertura reports into OpenCover, but report-generator can supposedly output lcov format which I think Sonar can accept. That might be a viable option for us and likely less effort than trying to add support here.

@danielpalme can report generator convert Cobertura to OpenCover?

danielpalme commented 1 year ago

@danielpalme can report generator convert Cobertura to OpenCover?

No, OpenCover is not supported as output format (only Cobertura, lcov and Clover).

petli commented 1 year ago

@pinkfloydx33 ReportGenerator can convert to the generic SonarQube coverage format, maybe that will help you?

pinkfloydx33 commented 1 year ago

Yeah I noticed that too. The generic format is somewhat limited I think. We already use it to report additional linting issues for our React apps so it's at least not foreign to us. I'd have to check if there's any implications in using that format over OpenCover wrt what Sonar displays/can report on for coverage purposes.

Generic format or lcov, I'm still going to have to update our CI processes to stop generating multiple formats directly, add a conversion step and then tweak the sonar parameters. Not a big deal, but would've preferred OC supported deterministic reports.

Is there any reason OC can't or that makes it difficult? Maybe I will look into offering a PR (ya know... If I ever get some time to myself 😄)

danielpalme commented 1 year ago

OpenCover is no longer maintained.

dhduvall commented 1 year ago

FWIW, a discussion on Sonar's Discourse.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 3 months with no activity.

github-actions[bot] commented 4 months ago

This issue was closed because it has been inactive for 9 months since being marked as stale.