covr 3.6.5
CRAN release: 2025-11-09
New Features and improvements
Added support for
klmr/boxmodules. This works best withfile_coverage(). (@radbasa, #491)Performance improvement for compiled code with a lot of compilation units (@krlmlr, #611)
Fix R CMD check NOTE for upcoming R 4.6: non-API calls to SET_BODY, SET_CLOENV, SET_FORMALS (@t-kalinowski, #587)
Fixes and minor improvements
Messages are now displayed using cli instead of crayon (@olivroy, #591).
covr now uses
testthat::with_mocked_bindings()for its internal testing (@olivroy, #595).Fix a bug preventing
package_coverage()from running tests wheninstall_pathis set to a relative path (@gergness, #517, #548).Fixed a performance regression and an error triggered by a change in R 4.4.0. (@kyleam, #588)
Fixed an issue where attempting to generate code coverage on an already-loaded package could fail on Windows. (@kevinushey, #574)
Prevent
covr.record_testsoption from logging duplicate tests when the same line of testing code is hit repeatedly, as in a loop. (@dgkf, #528)Normalize
install_pathpath before creating directory to prevent failures when running covr in a subprocess using a path with Windows\\path separators. (@maksymiuks, #592)
covr 3.6.3
CRAN release: 2023-10-10
Updates to internal usage of
is.atomic()to work with upcoming R release (@mmaechler , #542)package_coverage()now works correctly with ignore files when it is not run in the package root directory (@mpadge, #538)
covr 3.6.1
CRAN release: 2022-08-26
to_cobertura()is now explicit about the doctype of the resulting XML. It also sets a source path if recorded. (@mmyrte, #524)The internal generic
merge_coverage()now correctly registers the S3 methods.The internal test for recording large calls no longer assumes R is on the system PATH.
covr 3.6.0
CRAN release: 2022-08-24
Added
covr.record_testsoption. WhenTRUE, this enables the recording of the trace of the tests being executed and adds an itemization of which tests result in the execution of each trace. For more details see?covr.record_tests(@dgkf, #463, #485, #503)as.data.frame()now returns an 0 row data frame when there are no functions in a package (#427)codecov()is now more robust whencoverageis not the output frompackage_coverage()andtokenis not provided (#456)package_coverage(code = )now accepts character vectors of length greater than 1 (@bastistician, #481)package_coverage()now handles packages with install or render time examples (#488)package_coverage()now sets the environment variableR_TESTSto the tests-startup.R file like R CMD check does (#420)report()now provides a more detailed error message if theDTandhtmltoolsdependencies are not installed (#500).Fix
parse_gcovbug when package is stored in directory with regex special characters, see #459Error/warning thrown for, respectively, missing gcov or empty parsed gcov output (@stephematician, #448)
Support Google Cloud Build uploading reports to Codecov.io (@MarkEdmondson1234 #469)
covr is now licensed as MIT (#454)
covr 3.5.1
CRAN release: 2020-09-16
codecov()andcoveralls()now retry failed requests before raising an error (#428, @jameslamb)
covr 3.5.0
CRAN release: 2020-03-06
codecov()now supports GitHub Actions for public repositories without having to specify a token.New
to_sonarqube()function added to support SonarQube generic XML format (@nibant, @Delfic, #413).
covr 3.4.0
CRAN release: 2019-11-26
codecov()now supports GitHub Actions.New
in_covr()function added to return true if code is being run by covr (#407).file_coverage(),environment_coverage()andfunction_coverage()now setR_COVR=true, to be consistent withpackage_coverage()(#407)
covr 3.3.1
CRAN release: 2019-08-23
- Fix inadvertent regression in return visibility when functions are covered. covr versions prior to 3.3.0 surrounded each statement in
{blocks. covr 3.3.0 switched to using({, but this caused an inadvertent regression, as(will make the result visible it is the last expression in a function. Usingif (TRUE) {restores the previous behavior. (#391, #392)
covr 3.3.0
CRAN release: 2019-08-06
New Features
New
azure()function added to make it easy to use covr on Azure Pipelines (#370)Work around issues related to the new curly curly syntax in rlang (#379, #377, rlang#813)
Compiled code coverage has been improved, in particular C++ templates now contain the merged coverage of all template instances, even if the instances were defined in separate compilation units. (#390)
Bugfixes and minor improvements
codecovnow lookscodecov.ymlfor token ifCODECOV_TOKENenvvar is not set (@MishaCivey #349).per_line()now does not track lines with only punctuation such as}or{(#387)tally_coverage()now includes compiled code, like it did previously (#384)Define the necessary coverage flags for C++14, C++17 and C++20 (#369).
to_cobertura()now works with Cobertura coverage-04.dtd (@samssann, #337).R6 class generators prefixed with
.are now included in coverage results (@jameslamb, #356).package_coverage()gains optionpre_clean, set toFALSEto disable cleaning of existing objects before runningpackage_coverage()(@jpritikin, #375)
