trailing_blank_lines_linter: Trailing blank lines linter

View source: R/trailing_blank_lines_linter.R

trailing_blank_lines_linterR Documentation

Trailing blank lines linter

Description

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

Usage

trailing_blank_lines_linter()

Tags

default, style

See Also

linters for a complete list of linters available in lintr.

Examples


# 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()
)


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