Skip to content

Combine all paste linters #998

Closed
Closed

Description

@AshesITR

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)

Activity

  1. 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
  2. added this to the 3.0.0 milestone on Mar 25, 2022
  3. MichaelChirico commented on Mar 25, 2022

    @MichaelChirico
    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 = )
  4. AshesITR commented on Mar 25, 2022

    @AshesITR
    CollaboratorAuthor

    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.

  5. MichaelChirico commented on Apr 27, 2022

    @MichaelChirico
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions