Skip to content

Commit

Permalink
Rename check_version to remote
Browse files Browse the repository at this point in the history
  • Loading branch information
jimhester authored and HughParsonage committed Jul 2, 2019
1 parent 7060999 commit 75c4289
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 18 deletions.
3 changes: 3 additions & 0 deletions NEWS.md
@@ -1,5 +1,8 @@
# devtools 1.13.3.9000

* `check()` argument `check_version` has been renamed to `remote` to better
describe what tests are disabled (#1811)

* `get_path()`, `set_path()`, `add_path()` and `on_path()` have been removed,
this functionality is available with `withr::with_path()` (#1796).

Expand Down
22 changes: 11 additions & 11 deletions R/check.r
Expand Up @@ -33,7 +33,7 @@
#' is set to \code{TRUE}. If no spell checker is installed, a warning is
#' issued.)
#'
#' \item env vars set by arguments \code{check_version} and
#' \item env vars set by arguments \code{remote} and
#' \code{force_suggests}
#' }
#'
Expand All @@ -58,7 +58,7 @@ check <- function(pkg = ".",
...,
manual = FALSE,
cran = TRUE,
check_version = FALSE,
remote = FALSE,
force_suggests = FALSE,
run_dont_test = FALSE,
args = NULL,
Expand Down Expand Up @@ -117,7 +117,7 @@ check <- function(pkg = ".",
check_built(
built_path,
cran = cran,
check_version = check_version,
remote = remote,
force_suggests = force_suggests,
run_dont_test = run_dont_test,
manual = manual,
Expand All @@ -134,9 +134,9 @@ check <- function(pkg = ".",
#' @param path Path to built package.
#' @param cran if \code{TRUE} (the default), check using the same settings as
#' CRAN uses.
#' @param check_version Sets \code{_R_CHECK_CRAN_INCOMING_} env var.
#' If \code{TRUE}, performs a number of checked related
#' to version numbers of packages on CRAN.
#' @param remote Sets \code{_R_CHECK_CRAN_INCOMING_REMOTE_} env var.
#' If \code{TRUE}, performs a number of CRAN incoming checks that require
#' remote access.
#' @param force_suggests Sets \code{_R_CHECK_FORCE_SUGGESTS_}. If
#' \code{FALSE} (the default), check will proceed even if all suggested
#' packages aren't found.
Expand All @@ -150,7 +150,7 @@ check <- function(pkg = ".",
#' @param quiet if \code{TRUE} suppresses output from this function.
#' @inheritParams rcmdcheck::rcmdcheck
check_built <- function(path = NULL, cran = TRUE,
check_version = FALSE, force_suggests = FALSE,
remote = FALSE, force_suggests = FALSE,
run_dont_test = FALSE, manual = FALSE, args = NULL,
env_vars = NULL, check_dir = tempdir(), quiet = FALSE,
error_on = c("never", "error", "warning", "note")) {
Expand Down Expand Up @@ -184,7 +184,7 @@ check_built <- function(path = NULL, cran = TRUE,
args <- c(args, "--no-manual")
}

env_vars <- check_env_vars(cran, check_version, force_suggests, env_vars)
env_vars <- check_env_vars(cran, remote, force_suggests, env_vars)
if (!quiet) {
cat_rule(
left = "Checking",
Expand All @@ -200,16 +200,16 @@ check_built <- function(path = NULL, cran = TRUE,
})
}

check_env_vars <- function(cran = FALSE, check_version = FALSE,
check_env_vars <- function(cran = FALSE, remote = FALSE,
force_suggests = TRUE, env_vars = character()) {
c(
aspell_env_var(),
# Switch off expensive check for package version
# https://github.com/r-lib/devtools/issues/1271
if (getRversion() >= "3.4.0" && as.numeric(R.version[["svn rev"]]) >= 70944) {
c("_R_CHECK_CRAN_INCOMING_REMOTE_" = as.character(check_version))
c("_R_CHECK_CRAN_INCOMING_REMOTE_" = as.character(remote))
} else {
c("_R_CHECK_CRAN_INCOMING_" = as.character(check_version))
c("_R_CHECK_CRAN_INCOMING_" = as.character(remote))
},
"_R_CHECK_FORCE_SUGGESTS_" = as.character(force_suggests),
env_vars
Expand Down
2 changes: 1 addition & 1 deletion R/release.r
Expand Up @@ -59,7 +59,7 @@ release <- function(pkg = ".", check = FALSE, args = NULL) {
right = pkg$package,
line = 2
)
check(pkg, cran = TRUE, check_version = TRUE, manual = TRUE,
check(pkg, cran = TRUE, remote = TRUE, manual = TRUE,
build_args = args, run_dont_test = TRUE)
}
if (yesno("Have you run `R CMD check` locally?"))
Expand Down
12 changes: 6 additions & 6 deletions man/check.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 75c4289

Please sign in to comment.