Learn R Programming

box.linters (version 0.10.6)

box_universal_import_linter: box library universal import linter

Description

Checks that all function imports are explicit. package[...] is not used.

Usage

box_universal_import_linter()

Arguments

Value

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

Details

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

Examples

Run this code
# will produce lints
lintr::lint(
  text = "box::use(base[...])",
  linters = box_universal_import_linter()
)

lintr::lint(
  text = "box::use(path/to/file[...])",
  linters = box_universal_import_linter()
)

# okay
lintr::lint(
  text = "box::use(base[print])",
  linters = box_universal_import_linter()
)

lintr::lint(
  text = "box::use(path/to/file[do_something])",
  linters = box_universal_import_linter()
)

Run the code above in your browser using DataLab