Skip to content

New linter length_unique_linter #2054

@AshesITR

Description

@AshesITR

I would put that as a separate linter.

The closer analogue is nested_ifelse_linter(), whose primary recommended alternatives are data.table::fcase() and dplyr::case_when().

But in that case, there are ways to avoid the nested ifelse() using base functions, so the user doesn't strictly need any new packages to fix the issue.

For length(unique(.)), there's no improvement in {base} (AFAIK).

Doesn't mean we shouldn't offer such a linter (since it'll be optional for users to turn on anyway), just by way of explaining why we didn't write that so far (it's certainly crossed my mind).

Originally posted by @MichaelChirico in #2051 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions