From a7caeee9aded20c11b94fe8e5638c27b2bb02264 Mon Sep 17 00:00:00 2001 From: Egor Suldin Date: Thu, 29 Aug 2024 02:56:52 +0200 Subject: [PATCH] Add VER to the list of known LCov directives (#414) * Fix description for LcovCoverageReporter * Add VER to the list of known LCov directives Add VER directive to the list of known directives to support the LCov reports with it. VER is an optional directive that can be added by some tools. For example, gcovr is adding it right now. --- diff_cover/violationsreporters/violations_reporter.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/diff_cover/violationsreporters/violations_reporter.py b/diff_cover/violationsreporters/violations_reporter.py index a4f4f382..e1d43dbd 100644 --- a/diff_cover/violationsreporters/violations_reporter.py +++ b/diff_cover/violationsreporters/violations_reporter.py @@ -264,7 +264,7 @@ def measured_lines(self, src_path): class LcovCoverageReporter(BaseViolationReporter): """ - Query information from a Cobertura|Clover|JaCoCo XML coverage report. + Query information from a LCov coverage report. """ def __init__(self, lcov_roots, src_roots=None): @@ -324,6 +324,7 @@ def parse(lcov_file): "BRF", "BRH", "BRDA", + "VER", ]: # these are valid lines, but not we don't need them continue