box_pkg_fun_exists_linter {box.linters}R Documentation

box library attached function exists and exported by package linter

Description

Checks that functions being attached exist and are exported by the package/library being called.

Usage

box_pkg_fun_exists_linter()

Details

For use in rhino, see the Explanation: Rhino style guide to learn about the details.

Value

A custom linter function for use with r-lib/lintr

Examples

# will produce lint
lintr::lint(
  text = "box::use(stringr[function_not_exists],)",
  linter = box_pkg_fun_exists_linter()
)

# okay
lintr::lint(
  text = "box::use(stringr[str_pad],)",
  linter = box_pkg_fun_exists_linter()
)

[Package box.linters version 0.10.0 Index]