lint_package: Lint a package

Description Usage Arguments Value Examples

View source: R/lint.R

Description

Apply one or more linters to all of the R files in a package.

Usage

1
2
lint_package(path = ".", relative_path = TRUE, ...,
  exclusions = list("R/RppExports.R"))

Arguments

path

the path to the base directory of the package, if NULL, it will be searched in the parent directories of the current directory.

relative_path

if TRUE, file paths are printed using their path relative to the base directory. If FALSE, use the full absolute path.

...

additional arguments passed to lint, e.g. cache or linters.

exclusions

exclusions for exclude, relative to the package path.

Value

A list of lint objects.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
  lint_package()

  lint_package(
    linters = with_defaults(semicolon_linter = semicolon_terminator_linter())
    cache = TRUE,
    exclusions = list("inst/doc/creating_linters.R" = 1, "inst/example/bad.R")
  )

## End(Not run)

lintr documentation built on Oct. 2, 2019, 1:03 a.m.