Risk of accidentally including dangerous code in dontrun
hughjonesd opened this issue · 1 comments
hughjonesd commented
You can't merge @examples and @doctest, so you need to convert @examples sections to @doctest. But then there's a risk it automatically includes code that you don't want in tests.
E.g. from dogfooding hughjonesd/huxtable:
#' @rdname report_latex_dependencies
#' @doctest
#'
#' \dontrun{
#' install_latex_dependencies() # oops this is now in the test
#' }
The best solution is probably "don't produce blank tests if there are no expectations".
hughjonesd commented
Fixed by indeed not including blank tests.