Use this if you want to check code coverage of CPO
s using
covr
. The functions inside CPO
s is
originally not accessible to covr
, so covrTraceCPOs
needs to be called in
the .onAttach
function. Note that putting it in .onLoad
will not work.
Currently, for this to work, the mb706 fork of covr
needs to be used. To install it,
call
devtools::install_github("mb706/covr")
To use it on Travis CI, add the line - mb706/covr
under the r_github_packages:
category.
This function comes at no runtime penalty: If the R_COVR
environment variable is not
set to “true”, then it only has an effect if force
is TRUE
.
covrTraceCPOs(env = parent.env(parent.frame()), force = FALSE)
env | [environment] |
---|---|
force | [logical(1)] |
[invisible(NULL)].