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

More tests for brace_linter() with pipes and formula syntax #1828

Merged
merged 2 commits into from
Dec 10, 2022

Conversation

IndrajeetPatil
Copy link
Collaborator

No description provided.

Comment on lines -76 to -85
expect_lint(
trim_some("
out <- lapply(stuff, function(i) {
do_something(i)
}) %>% unlist
"),
NULL,
linter
)

Copy link
Collaborator Author

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.

Comment on lines -152 to -165
expect_lint(
trim_some("
letters %>%
{
tibble(
lo = .,
hi = toupper(.)
)
} %>%
mutate(row_id = row_number())
"),
NULL,
linter
)
Copy link
Collaborator Author

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-commenter
Copy link

codecov-commenter commented Dec 10, 2022

Codecov Report

Merging #1828 (36b16cd) into main (7de378f) will not change coverage.
The diff coverage is n/a.

@@           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.

@IndrajeetPatil IndrajeetPatil added internals Issues related to inner workings of lintr, i.e., not user-visible testing and removed internals Issues related to inner workings of lintr, i.e., not user-visible labels Dec 10, 2022
@MichaelChirico MichaelChirico merged commit d4c484b into main Dec 10, 2022
@MichaelChirico MichaelChirico deleted the more_tests_brace_linter branch December 10, 2022 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants