View source: R/quotes_linter.R
quotes_linter | R Documentation |
Check that the desired quote delimiter is used for string constants.
quotes_linter(delimiter = c("\"", "'"))
delimiter |
Which quote delimiter to accept. Defaults to the tidyverse
default of |
configurable, consistency, default, readability, style
linters for a complete list of linters available in lintr.
# will produce lints
lint(
text = "c('a', 'b')",
linters = quotes_linter()
)
# okay
lint(
text = 'c("a", "b")',
linters = quotes_linter()
)
code_lines <- "paste0(x, '\"this is fine\"')"
writeLines(code_lines)
lint(
text = code_lines,
linters = quotes_linter()
)
# okay
lint(
text = "c('a', 'b')",
linters = quotes_linter(delimiter = "'")
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.