View source: R/missing_argument_linter.R
missing_argument_linter | R Documentation |
Check for missing arguments in function calls (e.g. stats::median(1:10, )
).
missing_argument_linter(
except = c("alist", "quote", "switch"),
allow_trailing = FALSE
)
except |
a character vector of function names as exceptions. |
allow_trailing |
always allow trailing empty arguments? |
common_mistakes, configurable, correctness
linters for a complete list of linters available in lintr.
# will produce lints
lint(
text = 'tibble(x = "a", )',
linters = missing_argument_linter()
)
# okay
lint(
text = 'tibble(x = "a")',
linters = missing_argument_linter()
)
lint(
text = 'tibble(x = "a", )',
linters = missing_argument_linter(except = "tibble")
)
lint(
text = 'tibble(x = "a", )',
linters = missing_argument_linter(allow_trailing = TRUE)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.