-
Notifications
You must be signed in to change notification settings - Fork 186
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
False positive open_curly_linter
/ pipe_continuation_linter
in magrittr pipelines
#1028
Comments
Slight clarification: the trailing comment is not part of the issue: letters %>%
{
tibble(
lo = .,
hi = toupper(.)
)
} %>%
mutate(row_id = row_number()) also lints. We should probably prefer to align to what styler::style_text("
letters %>%
{
tibble(
lo = .,
hi = toupper(.)
)
} %>%
mutate(row_id = row_number())
") gives letters %>%
{
tibble(
lo = .,
hi = toupper(.)
)
} %>%
mutate(row_id = row_number()) Starting from the second option gives the same: styler::style_text("
letters %>% {
tibble(
lo = .,
hi = toupper(.)
)
} %>%
mutate(row_id = row_number())
") letters %>%
{
tibble(
lo = .,
hi = toupper(.)
)
} %>%
mutate(row_id = row_number()) |
Very similar to #487 (maybe the same?) |
Worth considering separately for the to-be |
Thanks for reminding me, we should add an exclusion if the preceding token is a magrittr pipe. |
Adding a comma and an opening parenthesis to that exclusion would also fix #487 if I am not mistaken (but I may be!). |
There is no way to make this piece of code lint-free without rewriting:
The text was updated successfully, but these errors were encountered: