archived-codacy / csharp-codacy-coverage

DEPRECATED C# coverage reporter for Codacy
Apache License 2.0
5 stars 3 forks source link

OverflowException when reporting coverage #5

Closed mrfyda closed 4 years ago

mrfyda commented 5 years ago

User getting OverflowException when uploading the report:

Screenshot 2019-10-25 at 15 29 07



(related to Zendesk ticket #8221)
gz#8221

kreghek commented 5 years ago

Hi. I have the same error. I am sending a report made by dotCover. You can see the build log on CircleCI at the link https://circleci.com/gh/kreghek/Zilon_Roguelike/2850

ljmf00 commented 5 years ago

Hi @kreghek ,

There's already a fix for the OverflowException. To report a detailed dotcover file use --ReportType=DetailedXML instead of --ReportType=XML, because it's mandatory for the tool to send the file paths to codacy, otherwise it will send an empty report file.

The tool will also send a warning if it detects empty File elements on the XML.

Thanks, Luis

kreghek commented 5 years ago

--ReportType = DetailedXML and the new version 1.0.3 helped. Thank!

ajaymgaikwad commented 5 years ago

Same error still we getting while upload code coverage report. codacy-error_01

ljmf00 commented 5 years ago

Hey @ajaymgaikwad ,

What version of codacy csharp coverage reporter you are using?

Thanks, Luis

ajaymgaikwad commented 5 years ago

Hi @ljmf00 ,

We are using Resharper dotCover to generate code coverage, find attached Resharper version details for your reference. cover_version

ljmf00 commented 5 years ago

Hi @ajaymgaikwad ,

Thanks for the additional information. If you are using dotcover you should specify -e dotcover instead of -e opencover.

Also, I was asking about codacy tool. If you are generating the report with --ReportType=DetailedXML you shouldn't have problems, because codacy need to know the file indices.

To avoid OverflowException, make sure you are using the latest version of the tool, its fixed with #6 PR.

Thanks, Luis