default_settings: Default lintr settings

default_settingsR Documentation

Default lintr settings

Description

The default settings consist of

  • linters: a list of default linters (see default_linters())

  • encoding: the character encoding assumed for the file

  • exclude: pattern used to exclude a line of code

  • exclude_start, exclude_end: patterns used to mark start and end of the code block to exclude

  • exclude_linter, exclude_linter_sep: patterns used to exclude linters

  • exclusions: a list of exclusions, see exclude() for a complete description of valid values.

  • cache_directory: location of cache directory

  • comment_token: a GitHub token character

  • comment_bot: decides if lintr comment bot on GitHub can comment on commits

  • error_on_lint: decides if error should be produced when any lints are found

There are no settings without defaults, i.e., this list describes every valid setting.

Usage

default_settings

Format

An object of class list of length 13.

See Also

read_settings(), default_linters

Examples

# available settings
names(default_settings)

# linters included by default
names(default_settings$linters)

# default values for a few of the other settings
default_settings[c(
  "encoding",
  "exclude",
  "exclude_start",
  "exclude_end",
  "exclude_linter",
  "exclude_linter_sep",
  "exclusions",
  "error_on_lint"
)]


lintr documentation built on Nov. 7, 2023, 5:07 p.m.