View source: R/box_unused_attached_pkg_fun_linter.R
box_unused_att_pkg_fun_linter | R Documentation |
box
library unused attached package function linterChecks that all attached package functions are used within the source file.
box_unused_att_pkg_fun_linter()
For use in rhino
, see the
Explanation: Rhino style guide
to learn about the details.
A custom linter function for use with r-lib/lintr
.
# will produce lints
code <- "
box::use(
stringr[str_pad],
)
"
lintr::lint(text = code, linters = box_unused_att_pkg_fun_linter())
code <- "
box::use(
stringr[alias_func = str_pad],
)
"
lintr::lint(text = code, linters = box_unused_att_pkg_fun_linter())
# okay
code <- "
box::use(
stringr[str_pad],
)
str_pad()
"
lintr::lint(text = code, linters = box_unused_att_pkg_fun_linter())
code <- "
box::use(
stringr[alias_func = str_pad],
)
alias_func()
"
lintr::lint(text = code, linters = box_unused_att_pkg_fun_linter())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.