You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let's think about it in an issue. there are a few paste-related linters incoming. as I was writing this PR I thought it might make sense to merge them all into just one paste_linter.
another thing I see sometimes that I'd like to lint is paste0(x, collapse=). if there's only one input it's the same as the paste version, but it'd be nice to be consistent and the paste0 looks a bit distracting/misleading to me
changed the title [-]let's think about it in an issue. there are a few paste-related linters incoming. as I was writing this PR I thought it might make sense to merge them all into just one paste_linter.[/-][+]Combine all paste linters[/+]on Mar 25, 2022
Activity
[-]let's think about it in an issue. there are a few paste-related linters incoming. as I was writing this PR I thought it might make sense to merge them all into just one paste_linter.[/-][+]Combine all paste linters[/+]MichaelChirico commentedon Mar 25, 2022
Our existing linters relating to
paste/paste0are:PasteSepLinter:paste(sep = "")➡️paste0()PasteToStringLinter:paste(collapse = ", ")➡️toString()PasteFilePathLinter:paste(sep = "/")➡️file.path()PasteStrrepLinter:paste(rep(), collapse="")➡️strrep()In addition there were two new "unusual" usages to consider:
paste0(sep = "<anything>")➡️paste(sep = "<anything>")paste0(x, collapse = )➡️paste(x, collapse = )AshesITR commentedon Mar 25, 2022
The
toString()lint could also point toglue::glue_collapse()in its message in case the actual intention is to create a human friendly enumeration.MichaelChirico commentedon Apr 27, 2022
Closing here; tracking the rest in #1108 after release