Skip to content

Commit

Permalink
extract complex conditional into a variable
Browse files Browse the repository at this point in the history
  • Loading branch information
IndrajeetPatil committed Dec 8, 2023
1 parent 6f1df16 commit f2f491b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/testthat/test-get_source_expressions.R
Original file line number Diff line number Diff line change
Expand Up @@ -371,10 +371,10 @@ patrick::with_parameters_test_that(
linter <- eval(call(linter))
}
expression <- expressions[[expression_idx]]
if (
is_valid_linter_level <-
(is_linter_level(linter, "expression") && is_lint_level(expression, "expression")) ||
(is_linter_level(linter, "file") && is_lint_level(expression, "file"))
) {
if (is_valid_linter_level) {
expect_no_warning({
lints <- linter(expression)
})
Expand Down

0 comments on commit f2f491b

Please sign in to comment.