From 298b704ff55c1ae518c8a0ac483e653ac205ad1e Mon Sep 17 00:00:00 2001 From: Niklas Dewally Date: Tue, 22 Oct 2024 21:43:38 +0100 Subject: [PATCH] fix(code-coverage): ignore whitespace when parsing coverage info --- tools/code-coverage-diff/calculate_coverage_difference.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/code-coverage-diff/calculate_coverage_difference.py b/tools/code-coverage-diff/calculate_coverage_difference.py index 8040a30f39..b3446f5059 100644 --- a/tools/code-coverage-diff/calculate_coverage_difference.py +++ b/tools/code-coverage-diff/calculate_coverage_difference.py @@ -16,6 +16,7 @@ def parse_coverage_data(coverage_data): coverage_dict = {} for line in coverage_data.splitlines(): + line=line.strip() match = re.match(r'(\w+).*: ([\d.]+)% \((\d+) of (\d+)', line) if match: # store coverage details in a dictionary