View source: R/trailing_blank_lines_linter.R
trailing_blank_lines_linter | R Documentation |
Check that there are no trailing blank lines in source code.
trailing_blank_lines_linter()
default, style
linters for a complete list of linters available in lintr.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.