Report the use of undesirable functions, e.g. base::return()
, base::options()
, or
base::sapply()
and suggest an alternative.
undesirable_function_linter(
fun = default_undesirable_functions,
symbol_is_undesirable = TRUE
)
Named character vector. names(fun)
correspond to undesirable functions,
while the values give a description of why the function is undesirable.
If NA
, no additional information is given in the lint message. Defaults to
default_undesirable_functions. To make small customizations to this list,
use modify_defaults()
.
Whether to consider the use of an undesirable function name as a symbol undesirable or not.
best_practices, configurable, efficiency, robustness, style
linters for a complete list of linters available in lintr.