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_return_linter #2299

Merged
merged 6 commits into from
Nov 19, 2023
Merged

New pipe_return_linter #2299

merged 6 commits into from
Nov 19, 2023

Conversation

MichaelChirico
Copy link
Collaborator

Part of #884

No hits on {lintr}.

@codecov-commenter
Copy link

codecov-commenter commented Nov 17, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (9920110) 99.40% compared to head (b5daff7) 99.40%.

❗ Current head b5daff7 differs from pull request most recent head cd74f81. Consider uploading reports for the commit cd74f81 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2299   +/-   ##
=======================================
  Coverage   99.40%   99.40%           
=======================================
  Files         117      117           
  Lines        5334     5334           
=======================================
  Hits         5302     5302           
  Misses         32       32           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

expect_lint(nested_return_lines, NULL, linter)
})

test_that("pipe_return_linter blocks simple disallowed usages", {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also checked this for lambdas and it works as expected. But I don't think we need to add tests for that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do you mean by lambdas in this case? |>? see the comment in the R/ script -- native pipe is excluded because using return() there is a parser error

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I meant with purrr's mappers :)

@IndrajeetPatil IndrajeetPatil merged commit 0aefa5f into main Nov 19, 2023
20 checks passed
@IndrajeetPatil IndrajeetPatil deleted the pipe_return branch November 19, 2023 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants