The following issues are linted by default by this linter (and each can be turned off optionally):
paste_linter(allow_empty_sep = FALSE, allow_to_string = FALSE)
best_practices, consistency
Block usage of paste()
with sep = ""
. paste0()
is a faster, more concise alternative.
Block usage of paste()
or paste0()
with collapse = ", "
. toString()
is a direct
wrapper for this, and alternatives like glue::glue_collapse()
might give better messages for humans.
Block usage of paste0()
that supplies sep=
-- this is not a formal argument to paste0
, and
is likely to be a mistake.
linters for a complete list of linters available in lintr.