Skip to content

Update the pipe_consistency_linter() default to be '|>'? #2707

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

Closed
MichaelChirico opened this issue Jan 14, 2025 · 1 comment · Fixed by #2796
Closed

Update the pipe_consistency_linter() default to be '|>'? #2707

MichaelChirico opened this issue Jan 14, 2025 · 1 comment · Fixed by #2796
Labels
breaking change ☠️ API change likely to affect existing code

Comments

@MichaelChirico
Copy link
Collaborator

The upstream style guide now unambiguously recommends |> over %>%:

https://style.tidyverse.org/pipes.html#magrittr

Therefore I think we should update our default in pipe_consistency_linter() from "be consistent" to "use |>".

@MichaelChirico MichaelChirico added the breaking change ☠️ API change likely to affect existing code label Jan 14, 2025
@AshesITR
Copy link
Collaborator

Agreed. Though some syntax sugar for the magrittr pipe is lost and for older code bases I would hardly recommend refactoring to change the pipe style. The NEWS.md should include some guidance for this case I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change ☠️ API change likely to affect existing code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants