R/deprecated.R

Defines functions lintr_deprecated

#' Deprecated functions
#'
#' Functions that have been deprecated and replaced by newer ones. They will be removed in an
#' upcoming version of \pkg{lintr} and should thus not be used anymore.
#' @noRd
NULL

lintr_deprecated <- function(what, alternative = NULL, version = NULL,
                             type = "Function", signal = c("warning", "stop")) {
  signal <- match.arg(signal)
  signal <- match.fun(signal)
  msg <- c(
    c(type, " ", what, " was deprecated"),
    if (length(version) > 0L) c(" in lintr version ", version),
    ". ",
    if (length(alternative) > 0L) c("Use ", alternative, " instead.")
  )
  msg <- paste(msg, collapse = "")
  signal(msg, call. = FALSE, domain = NA)
}

Try the lintr package in your browser

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

lintr documentation built on April 12, 2025, 1:42 a.m.