conjunct_test_linter {lintr} | R Documentation |
For readability of test outputs, testing only one thing per call to
testthat::expect_true()
is preferable, i.e.,
expect_true(A); expect_true(B)
is better than expect_true(A && B)
, and
expect_false(A); expect_false(B)
is better than expect_false(A || B)
.
conjunct_test_linter(allow_named_stopifnot = TRUE)
allow_named_stopifnot |
Logical, |
Similar reasoning applies to &&
usage inside stopifnot()
and assertthat::assert_that()
calls.
best_practices, package_development, readability
linters for a complete list of linters available in lintr.