trailing_blank_lines_linter {lintr}R 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()
)


[Package lintr version 3.1.2 Index]