use_lintr: Use lintr in your project

View source: R/use_lintr.R

use_lintrR Documentation

Use lintr in your project

Description

Create a minimal lintr config file as a starting point for customization

Usage

use_lintr(path = ".", type = c("tidyverse", "full"))

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

What kind of configuration to create?

  • tidyverse creates a minimal lintr config, based on the default linters (linters_with_defaults()). These are suitable for following the tidyverse style guide.

  • full creates a lintr config using all available linters via linters_with_tags().

Value

Path to the generated configuration, invisibly.

See Also

vignette("lintr") for detailed introduction to using and configuring lintr.

Examples

if (FALSE) {
  # use the default set of linters
  lintr::use_lintr()
  # or try all linters
  lintr::use_lintr(type = "full")

  # then
  lintr::lint_dir()
}

lintr documentation built on May 29, 2024, 11:31 a.m.