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

New linter length_unique_linter #2054

Open
AshesITR opened this issue Aug 8, 2023 · 0 comments
Open

New linter length_unique_linter #2054

AshesITR opened this issue Aug 8, 2023 · 0 comments
Milestone

Comments

@AshesITR
Copy link
Collaborator

AshesITR commented Aug 8, 2023

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)

@MichaelChirico MichaelChirico added this to the 3.1.1 milestone Aug 22, 2023
@MichaelChirico MichaelChirico modified the milestones: 3.1.1, 3.1.2 Sep 6, 2023
@MichaelChirico MichaelChirico modified the milestones: 3.2.0, 3.3.0 Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants