-
Notifications
You must be signed in to change notification settings - Fork 188
Closed
Labels
false-positivecode that shouldn't lint, but doescode that shouldn't lint, but does
Description
library(lintr)
dir <- tempfile()
pkg <- usethis::create_package(dir, open = FALSE, rstudio = FALSE)
setwd(pkg)
fs::dir_create("R")
writeLines(
c("#' @export", "#' @importFrom magrittr \"%>%\"", "magrittr::`%>%`"),
"R/script.R"
)
devtools::document()
#> ℹ Updating file6b4e37419a97 documentation
#> ℹ Loading file6b4e37419a97
#> Writing 'NAMESPACE'
#> Writing 'NAMESPACE'
#> Writing 'reexports.Rd'
readLines("NAMESPACE")
#> [1] "# Generated by roxygen2: do not edit by hand"
#> [2] ""
#> [3] "export(\"%>%\")"
#> [4] "importFrom(magrittr,\"%>%\")"
devtools::install(quiet = TRUE)
lintr::lint_package(linters = namespace_linter())
#> R/script.R:3:11: warning: [namespace_linter] '`%>%`' is not exported from {magrittr}.
#> magrittr::`%>%`
#> ^~~~~
Created on 2022-10-23 with reprex v2.0.2
Metadata
Metadata
Assignees
Labels
false-positivecode that shouldn't lint, but doescode that shouldn't lint, but does