Learn R Programming

box.linters (version 0.10.6)

use_box_lintr: Use lintr with box.linters in your project

Description

Create a minimal lintr config file with box modules support as a starting point for customization

Usage

use_box_lintr(path = ".", type = c("basic_box", "rhino"))

Value

Path to the generated configuration, invisibly.

Arguments

path

Path to project root where a .lintr file should be created. If the .lintr file already exists, an error will be thrown.

type

The kind of configuration to create

  • basic_box creates a minimal lintr config based on the tidyverse configuration of lintr. This starts with lintr::linters_with_defaults() and is customized for box module compatibility

  • rhino creates a lintr config based on the Rhino style guide

Examples

Run this code
if (FALSE) {
  # use default box-compatible set of linters
  box.linters::use_box_lintr()

  # use `rhino` set of linters
  box.linters::use_box_lintr(type = "rhino")
}

Run the code above in your browser using DataLab