anthonynorth / roxyglobals

Generate utils::globalVariables() from roxygen tags
Other
52 stars 0 forks source link

@autoglobal doesn't search package imports for globals #8

Closed anthonynorth closed 1 year ago

anthonynorth commented 1 year ago

@autoglobal doesn't search the package imports namespace for globals. This results in adding globals that wouldn't be triggered by rcmdcheck anyway -- unnecessary noise. Example:

#' @autoglobal
#' @importFrom pkgname funcname
my_func <- function(data) {
  # funcname will be added to utils::globals()
  dplyr::rename(data, newname = funcname)
}