View source: R/sprintf_linter.R
| sprintf_linter | R Documentation |
sprintf() callsCheck for an inconsistent number of arguments or arguments with incompatible types (for literal arguments) in
sprintf() calls.
sprintf_linter()
gettextf() calls are also included, since gettextf() is a thin wrapper around sprintf().
common_mistakes, correctness
linters for a complete list of linters available in lintr.
# will produce lints
lint(
text = 'sprintf("hello %s %s %d", x, y)',
linters = sprintf_linter()
)
# okay
lint(
text = 'sprintf("hello %s %s %d", x, y, z)',
linters = sprintf_linter()
)
lint(
text = 'sprintf("hello %s %s %d", x, y, ...)',
linters = sprintf_linter()
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.