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
Hi, recently I exported some Rcpp functions from a package to R and cpp interfaces using // [[Rcpp:interfaces(r, cpp)]] attribute. When I pushed the changes to Github, the test-coverage workflow began to test coverage on an auto-generated file (by Rcpp) inst/include/<pkg_name>_RcppExports.h. In this file, there is an unnamed namespace that defined a function validateSignature() (example below), which seemed invisible outside the file and thus could not be tested (and thus could not be covered), decreasing code coverage from 100%. In the end, I added .covrignore file to manually disable code coverage on this file. I noticed that some auto-generated files are already ignored by covr including RcppExports.cpp, RcppExports.R and <pkg_name>.h. Should this auto-generated file inst/include/<pkg_name>_RcppExports.h also be ignored by default?
Here is an example with some auto-generated code not covered.
The text was updated successfully, but these errors were encountered:
zhuxr11
changed the title
Github test-coverage workflow tests Rcpp-generated header file in inst/include/<pkg_name>_RcppExports.h
Github test-coverage workflow does not ignore an Rcpp auto-generated header file inst/include/<pkg_name>_RcppExports.hApr 29, 2023
Hi, recently I exported some Rcpp functions from a package to R and cpp interfaces using
// [[Rcpp:interfaces(r, cpp)]]
attribute. When I pushed the changes to Github, the test-coverage workflow began to test coverage on an auto-generated file (by Rcpp)inst/include/<pkg_name>_RcppExports.h
. In this file, there is an unnamed namespace that defined a functionvalidateSignature()
(example below), which seemed invisible outside the file and thus could not be tested (and thus could not be covered), decreasing code coverage from 100%. In the end, I added.covrignore
file to manually disable code coverage on this file. I noticed that some auto-generated files are already ignored bycovr
includingRcppExports.cpp
,RcppExports.R
and<pkg_name>.h
. Should this auto-generated fileinst/include/<pkg_name>_RcppExports.h
also be ignored by default?Here is an example with some auto-generated code not covered.
The text was updated successfully, but these errors were encountered: