box_separate_calls_linter: 'box' library separate packages and module imports linter

View source: R/box_separate_calls_linter.R

box_separate_calls_linterR Documentation

box library separate packages and module imports linter

Description

Checks that packages and modules are imported in separate box::use() statements.

Usage

box_separate_calls_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 lints
lintr::lint(
  text = "box::use(package, path/to/file)",
  linters = box_separate_calls_linter()
)

lintr::lint(
  text = "box::use(path/to/file, package)",
  linters = box_separate_calls_linter()
)

# okay
lintr::lint(
  text = "box::use(package1, package2)
    box::use(path/to/file1, path/to/file2)",
  linters = box_separate_calls_linter()
)


box.linters documentation built on June 26, 2025, 5:07 p.m.