diff --git a/services/report/languages/simplecov.py b/services/report/languages/simplecov.py index 17e81028b..fa19723f2 100644 --- a/services/report/languages/simplecov.py +++ b/services/report/languages/simplecov.py @@ -37,6 +37,12 @@ def from_json(json: dict, report_builder_session: ReportBuilderSession) -> None: ) for ln, cov in enumerate(coverage_to_check, start=1): + if cov == "ignored": + # Lines that simplecov skipped are recorded as "ignored" by + # https://github.com/codeclimate-community/simplecov_json_formatter + # and we in turn record that as -1 which indicates a skipped line + # in our report + cov = -1 _file.append( ln, report_builder_session.create_coverage_line( diff --git a/services/report/report_processor.py b/services/report/report_processor.py index 275d320ae..3326168ab 100644 --- a/services/report/report_processor.py +++ b/services/report/report_processor.py @@ -129,7 +129,7 @@ def report_type_matching( processed = etree.fromstring(raw_report, parser=parser) if processed is not None and len(processed) > 0: return processed, "xml" - except ValueError: + except (ValueError, etree.XMLSyntaxError): pass return raw_report, "txt"