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 pipe_call_linter enforcing calls (not symbols) in magrittr pipes #801

Merged
merged 6 commits into from May 20, 2021

Conversation

MichaelChirico
Copy link
Collaborator

This enforces the following section of the tidyverse style guide:

https://style.tidyverse.org/pipes.html#no-arguments

@AshesITR
Copy link
Collaborator

Looks good so far. Can we also add a negative test for

x %>% { foo }

just to be sure symbols are allowed in curly braces?

@MichaelChirico
Copy link
Collaborator Author

MichaelChirico commented May 19, 2021 via email

@AshesITR
Copy link
Collaborator

This minimal code returns foo from the chain.
However, if this is correctly not linted, more complex code blocks should also be covered - e.g.

x %>% {
  tmp <- .
  bla <- foo %>% unrelated_stuff(tmp)
  my_combination_fun(tmp, bla)
}

@MichaelChirico
Copy link
Collaborator Author

MichaelChirico commented May 20, 2021 via email

@MichaelChirico
Copy link
Collaborator Author

Updated now. Thanks!

@AshesITR AshesITR merged commit 9c26edf into master May 20, 2021
@AshesITR AshesITR deleted the pipe-call branch May 20, 2021 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants