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

Lint seq_len(length(x)) #2577

Open
olivroy opened this issue May 15, 2024 · 4 comments
Open

Lint seq_len(length(x)) #2577

olivroy opened this issue May 15, 2024 · 4 comments
Labels
feature a feature request or enhancement

Comments

@olivroy
Copy link

olivroy commented May 15, 2024

Should be linted to seq_along(x)

Should not lint:

seq_len(length(x) - 1)

@MichaelChirico
Copy link
Collaborator

I agree! would you like to have a shot at writing a PR?

@IndrajeetPatil IndrajeetPatil added the feature a feature request or enhancement label May 15, 2024
@olivroy
Copy link
Author

olivroy commented May 15, 2024

Thanks for the offer! Maybe in the future. I have too many things at the moment, and I don't know the internals of lintr... But for reference, are there resources you would recommend to learn how to do it?

@IndrajeetPatil
Copy link
Collaborator

for reference, are there resources you would recommend to learn how to do it

https://lintr.r-lib.org/articles/creating_linters.html

@MichaelChirico
Copy link
Collaborator

that's the right starting point! beyond that the existing linters (and seq_linter() itself) are a great place to start.

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

No branches or pull requests

3 participants