-
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
More tests for brace_linter()
with pipes and formula syntax
#1828
Conversation
expect_lint( | ||
trim_some(" | ||
out <- lapply(stuff, function(i) { | ||
do_something(i) | ||
}) %>% unlist | ||
"), | ||
NULL, | ||
linter | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to a new test below.
expect_lint( | ||
trim_some(" | ||
letters %>% | ||
{ | ||
tibble( | ||
lo = ., | ||
hi = toupper(.) | ||
) | ||
} %>% | ||
mutate(row_id = row_number()) | ||
"), | ||
NULL, | ||
linter | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to a new test below, and replaced with a more minimal version:
# %>%\n{ is allowed
expect_lint(
trim_some("
1:4 %>%
{
sum(.)
}
"),
NULL,
linter
)
Codecov Report
@@ Coverage Diff @@
## main #1828 +/- ##
=======================================
Coverage 98.85% 98.85%
=======================================
Files 112 112
Lines 4814 4814
=======================================
Hits 4759 4759
Misses 55 55 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
No description provided.