View source: R/condition_call_linter.R
condition_call_linter | R Documentation |
call. = FALSE
in conditionsThis linter, with the default display_call = FALSE
, enforces the
recommendation of the tidyverse design guide regarding displaying error
calls.
condition_call_linter(display_call = FALSE)
display_call |
Logical specifying expected behavior regarding
|
best_practices, configurable, style, tidy_design
linters for a complete list of linters available in lintr.
# will produce lints
lint(
text = "stop('test')",
linters = condition_call_linter()
)
lint(
text = "stop('test', call. = TRUE)",
linters = condition_call_linter()
)
lint(
text = "stop('test', call. = FALSE)",
linters = condition_call_linter(display_call = TRUE)
)
lint(
text = "stop('this is a', 'test', call. = FALSE)",
linters = condition_call_linter(display_call = TRUE)
)
# okay
lint(
text = "stop('test', call. = FALSE)",
linters = condition_call_linter()
)
lint(
text = "stop('this is a', 'test', call. = FALSE)",
linters = condition_call_linter()
)
lint(
text = "stop('test', call. = TRUE)",
linters = condition_call_linter(display_call = TRUE)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.