View source: R/comment_linters.R
commented_code_linter | R Documentation |
Check that there is no commented code outside roxygen blocks.
commented_code_linter()
best_practices, default, readability, style
linters for a complete list of linters available in lintr.
# will produce lints
lint(
text = "# x <- 1",
linters = commented_code_linter()
)
lint(
text = "x <- f() # g()",
linters = commented_code_linter()
)
lint(
text = "x + y # + z[1, 2]",
linters = commented_code_linter()
)
# okay
lint(
text = "x <- 1; x <- f(); x + y",
linters = commented_code_linter()
)
lint(
text = "#' x <- 1",
linters = commented_code_linter()
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.