Skip to content

Commit

Permalink
Add missing test to function_return_linter() (#1578)
Browse files Browse the repository at this point in the history
  • Loading branch information
IndrajeetPatil authored Sep 30, 2022
1 parent 799a643 commit 82ca559
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/testthat/test-function_return_linter.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,16 @@ test_that("function_return_linter blocks simple disallowed usages", {
linter
)

expect_lint(
trim_some("
foo <- function(x) {
return(x + 1 ->> x)
}
"),
lint_msg,
linter
)

expect_lint(
trim_some("
foo <- function(x) {
Expand Down

0 comments on commit 82ca559

Please sign in to comment.