You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Gcov plugin: port confirmed bug fixes from the next_version review pass
Simple, targeted patches -- master's own (older, pre-delta-builds) code
shape, no refactor or new unit-test infrastructure -- porting the bug fixes
confirmed during the recent next_version Gcov plugin review
(gcov-plugin-review branch). Manually validated via
throwtheswitch/madsciencelab-plugins Docker plus one light new system-test
case.
- :gcov ↳ :gcovr ↳ :decisions version floor corrected 6.0 -> 5.1 -- gcovr's
own changelog and a real gcovr 5.1/5.0 pip install confirm --decisions was
introduced in 5.1, not 6.0.
- :fail_under_* now rejects 0 (documented range is 1-100; 0 was silently
accepted as a threshold that could never actually fail).
- :object_directory/:source_encoding values are now quoted -- an unquoted
value containing a space previously broke the constructed gcovr command
line.
- Regex-metacharacter-injection risk fixed in both :gcovr's and
:report_generator's auto-generated exclusion patterns -- :test_file_prefix,
:mock_prefix, and build-root path values are now Regexp.escape'd before
being spliced into exclusion regexes.
- :mcdc's GCC-version check moved out of Gcov#setup(), which runs for every
build the plugin is merely enabled for, into a lazily-invoked, memoized
check that fires only on a real gcov-context compile/link.
- gcovr_exec_exception? now reports every simultaneously violated
:fail_under_* threshold instead of only the first.
- Added the missing .dup guard in
ReportGeneratorReportinator#collect_reportgenerator_opts, mirroring the
existing guard on the gcovr side.
- gcovr 7.0+ deprecated flag migration: :branches/:sort_uncovered/
:sort_percentage now use --txt-metric branch/--sort uncovered-number/
--sort uncovered-percent at gcovr 7.0+, silencing gcovr's own deprecation
warnings; the pre-7.0 names are still used automatically below that.
- Removed dead code: gcovr_reportinator.rb set an internal :mcdc flag no
code path ever read. Confirmed via Docker (gcovr 8.6) that --decisions has
no effect on GCC's own condition/MC-DC data in either JSON or HTML --
gcovr's Condition-labeled content is byte-identical with and without it;
only a separate, additive Decision column depends on the flag.
- ConsoleReportinator#log_coverage_report: a Partial-implementation source
whose gcov output can't be matched at all now logs the same "Found no
coverage results" COMPLAIN the equivalent non-Partial case already did,
instead of silently producing no report and no log.
Explicitly not ported: the broader DRY refactor (ToolVersionGating,
build_args_from_table, etc.) and the new unit-test suite from the
next_version pass -- out of scope per plan (simple patches only); the
ReportGenerator coverage-threshold feature -- a new feature, not a bug fix.
New system-test case: project_with_gcov_fail_under_line_rejects_zero
(spec/system/support/gcov_common_test_cases.rb), regression-locking the `0`
rejection specifically, matching the existing
project_with_gcov_fail_under_decision pattern from the #1080 fix.
Small doc corrections alongside the code they describe: :decisions'
"Requires" floor in gcovr.md/reference/gcov-plugin.md, and the
:branches/:sort_uncovered/:sort_percentage deprecated-flag notes.
Verified: full unit suite (1978 examples, 0 failures), mkdocs build
--strict, and the full Gcov system-test suite (26 examples, 0 failures) via
throwtheswitch/madsciencelab-plugins:1.1.6 Docker.
No Changelog entry in this commit -- the 1.1.8 section (both branches) is a
separate, later step.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
0 commit comments