line_length_linter: Line length linter

View source: R/line_length_linter.R

line_length_linterR Documentation

Line length linter

Description

Check that the line length of both comments and code is less than length.

Usage

line_length_linter(length = 80L)

Arguments

length

maximum line length allowed. Default is 80L (Hollerith limit).

Tags

configurable, default, readability, style

See Also

Examples

# will produce lints
lint(
  text = strrep("x", 23L),
  linters = line_length_linter(length = 20L)
)

# okay
lint(
  text = strrep("x", 21L),
  linters = line_length_linter(length = 40L)
)


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