Learn R Programming

lintr (version 3.1.2)

trailing_blank_lines_linter: Trailing blank lines linter

Description

Check that there are no trailing blank lines in source code.

Usage

trailing_blank_lines_linter()

Arguments

Tags

default, style

See Also

linters for a complete list of linters available in lintr.

Examples

Run this code
# will produce lints
f <- withr::local_tempfile(lines = "x <- 1\n")
readLines(f)
lint(
  filename = f,
  linters = trailing_blank_lines_linter()
)

# okay
f <- withr::local_tempfile(lines = "x <- 1")
readLines(f)
lint(
  filename = f,
  linters = trailing_blank_lines_linter()
)

Run the code above in your browser using DataLab