box
library attached function exists and exported by package linter
Source: R/box_pkg_fun_exists_linter.R
box_pkg_fun_exists_linter.Rd
Checks that functions being attached exist and are exported by the package/library being called.
Details
For use in rhino
, see the
Explanation: Rhino style guide
to learn about the details.
Examples
# will produce lint
lintr::lint(
text = "box::use(stringr[function_not_exists],)",
linter = box_pkg_fun_exists_linter()
)
#> ::warning file=<text>,line=1,col=18::file=<text>,line=1,col=18,[box_pkg_fun_exists_linter] Function not exported by package.
# okay
lintr::lint(
text = "box::use(stringr[str_pad],)",
linter = box_pkg_fun_exists_linter()
)