tomasbjerre / violations-lib

Java library for parsing report files from static code analysis.
Apache License 2.0
148 stars 39 forks source link

JUnit parser cannot parse reports with plain errors #124

Closed uhafner closed 3 years ago

uhafner commented 3 years ago

It seems that the JUnit parser cannot parse reports with plain errors. This is similar to #120 (error rather than failure):

<testcase name="shouldParseEmptyFile" classname="edu.hm.hafner.analysis.parser.SonarQubeDiffParserTest" time="0">
    <error type="org.json.JSONException"><![CDATA[org.json.JSONException: Missing value at 0 [character 1 line 1]
]]></error>
</testcase>

The whole file is available in my downstream PR jenkinsci/analysis-model#604

Failure visible in https://github.com/jenkinsci/analysis-model/pull/604/checks?check_run_id=2296507586

tomasbjerre commented 3 years ago

Thanks for reporting!

Fixed byt parsing it as file - and line 0. Released as 1.144.4

Open issue again if not working!