Skip to content

Commit 5ee6932

Browse files
Measure branch coverage
AGENTS.md asks for full line and branch coverage of new code, but coverage only measured lines, so codecov could not see an untaken branch. Enable branch measurement for local runs and CI. Partial branches now count against the project total, which drops it below the old 95% target without any code getting less tested. New code is held to 100% by the patch status, so make the project status informational instead of moving the target.
1 parent 24f2c74 commit 5ee6932

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

‎codecov.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ coverage:
55
target: 100%
66
project:
77
default:
8-
target: 95%
8+
# Reported but never blocking: new code is held to 100% by the patch
9+
# status, and the total moves when the way it is measured changes.
10+
informational: true
911
comment:
1012
layout: "reach, diff, flags, files"

‎pyproject.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ ini_options.filterwarnings = [
296296
]
297297

298298
[tool.coverage]
299+
run.branch = true
299300
paths.source = [ "pylint" ]
300301
report.include = [ "pylint/*" ]
301302
report.omit = [ "*/test/*" ]

0 commit comments

Comments
 (0)