View source: R/namespaced_function_calls.R
namespaced_function_calls | R Documentation |
namespace::function()
calls except for box::*()
are not made.Check that namespace::function()
calls except for box::*()
are not made.
namespaced_function_calls(allow = NULL)
allow |
Character vector of |
# will produce lints
code <- "box::use(package)
tidyr::pivot_longer()"
lintr::lint(text = code, linters = namespaced_function_calls())
## allow `tidyr::pivot_longer()`
code <- "box::use(package)
tidyr::pivot_longer()
tidyr::pivot_wider()"
lintr::lint(text = code, linters = namespaced_function_calls(allow = c("tidyr::pivot_longer")))
# okay
code <- "box::use(package)"
lintr::lint(text = code, linters = namespaced_function_calls())
## allow all `tidyr`
code <- "box::use(package)
tidyr::pivot_longer()
tidyr::pivot_wider()"
lintr::lint(text = code, linters = namespaced_function_calls(allow = c("tidyr")))
## allow `tidyr::pivot_longer()`
code <- "box::use(package)
tidyr::pivot_longer()"
lintr::lint(text = code, linters = namespaced_function_calls(allow = c("tidyr::pivot_longer")))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.