# will produce lints
f <- tempfile()
cat("x <- 1\n\n", file = f)
writeLines(readChar(f, file.size(f)))
lint(
filename = f,
linters = trailing_blank_lines_linter()
)
unlink(f)
# okay
cat("x <- 1\n", file = f)
writeLines(readChar(f, file.size(f)))
lint(
filename = f,
linters = trailing_blank_lines_linter()
)
unlink(f)
Run the code above in your browser using DataLab