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 anonymous functions not using lambda syntax (when relevant) #2667

Open
IndrajeetPatil opened this issue Oct 2, 2024 · 3 comments
Open

Comments

@IndrajeetPatil
Copy link
Collaborator

cf. https://style.tidyverse.org/functions.html#anonymous-functions

Screenshot 2024-10-02 at 22 31 34

Currently, we don't lint these:

library(lintr)

lint(
  text = "map(xs, ~ mean((.x + 5L)))",
  linters = all_linters()
)
#> ℹ No lints found.

Created on 2024-10-02 with reprex v2.1.1

@MichaelChirico
Copy link
Collaborator

@hadley is there such a thing as "versioning" on the style guide?

There is a lot of activity on the guide now, I would want to wait for the rules to settle into place for a bit before making the effort to update {lintr} correspondingly. If there is a "version release" that would make this decision making easier.

@hadley
Copy link
Member

hadley commented Oct 3, 2024

There should be, but there isn't. I'd say that this tranche of activity has now died down and you can expect it to be ignored again for a while 😄

@MichaelChirico
Copy link
Collaborator

OK, filed tidyverse/style#233 as an earmark

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

3 participants