diff --git a/R/check.R b/R/check.R index f2d2cedf8..3602b3899 100644 --- a/R/check.R +++ b/R/check.R @@ -159,7 +159,9 @@ can_document <- function(pkg) { #' @rdname check #' @param path Path to built package. #' @param cran if `TRUE` (the default), check using the same settings as CRAN -#' uses. +#' uses. Because this is a moving target and is not uniform across all of +#' CRAN's machine, this is on a "best effort" basis. It is more complicated +#' than simply setting `--as-cran`. #' @param remote Sets `_R_CHECK_CRAN_INCOMING_REMOTE_` env var. If `TRUE`, #' performs a number of CRAN incoming checks that require remote access. #' @param incoming Sets `_R_CHECK_CRAN_INCOMING_` env var. If `TRUE`, performs a @@ -188,6 +190,10 @@ check_built <- function(path = NULL, cran = TRUE, if (cran) { args <- c("--as-cran", args) + env_vars <- c( + "_R_CHECK_PACKAGES_USED_IGNORE_UNUSED_IMPORTS_" = as.character(FALSE), + env_vars + ) } if (run_dont_test) { args <- c("--run-donttest", args) diff --git a/man/check.Rd b/man/check.Rd index 1a1a4ac7c..51ec0aca3 100644 --- a/man/check.Rd +++ b/man/check.Rd @@ -55,7 +55,9 @@ file. Use \code{TRUE} or \code{FALSE} to override the default.} \item{manual}{If \code{FALSE}, don't build and check manual (\code{--no-manual}).} \item{cran}{if \code{TRUE} (the default), check using the same settings as CRAN -uses.} +uses. Because this is a moving target and is not uniform across all of +CRAN's machine, this is on a "best effort" basis. It is more complicated +than simply setting \code{--as-cran}.} \item{remote}{Sets \verb{_R_CHECK_CRAN_INCOMING_REMOTE_} env var. If \code{TRUE}, performs a number of CRAN incoming checks that require remote access.}