R/revdep.R

Defines functions use_revdep

Documented in use_revdep

#' Reverse dependency checks
#'
#' Performs set up for checking the reverse dependencies of an R package, as
#' implemented by the revdepcheck package:
#' * Creates `revdep/` directory and adds it to `.Rbuildignore`
#' * Populates `revdep/.gitignore` to prevent tracking of various revdep
#' artefacts
#' * Prompts user to run the checks with `revdepcheck::revdep_check()`
#'
#' @export
use_revdep <- function() {
  check_is_package("use_revdep()")
  use_directory("revdep", ignore = TRUE)
  use_git_ignore(
    directory = "revdep",
    c(
      "checks", "library",
      "checks.noindex", "library.noindex", "cloud.noindex",
      "data.sqlite", "*.html"
    )
  )

  ui_todo("Run checks with {ui_code('revdepcheck::revdep_check(num_workers = 4)')}")
  invisible()
}

Try the usethis package in your browser

Any scripts or data that you put into this service are public.

usethis documentation built on July 9, 2023, 7:23 p.m.