Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combine all paste linters #998

Closed
AshesITR opened this issue Mar 25, 2022 · 3 comments
Closed

Combine all paste linters #998

AshesITR opened this issue Mar 25, 2022 · 3 comments
Milestone

Comments

@AshesITR
Copy link
Collaborator

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

Originally posted by @MichaelChirico in #997 (comment)

@AshesITR AshesITR 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 Mar 25, 2022
@AshesITR AshesITR added this to the 3.0.0 milestone Mar 25, 2022
@MichaelChirico
Copy link
Collaborator

Our existing linters relating to paste / paste0 are:

In addition there were two new "unusual" usages to consider:

  • paste0(sep = "<anything>") ➡️ paste(sep = "<anything>")
  • paste0(x, collapse = ) ➡️ paste(x, collapse = )

@AshesITR
Copy link
Collaborator Author

The toString() lint could also point to glue::glue_collapse() in its message in case the actual intention is to create a human friendly enumeration.

@MichaelChirico
Copy link
Collaborator

Closing here; tracking the rest in #1108 after release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants