expect_not_linter {lintr}R Documentation

Require usage of expect_false(.) over expect_true(!.)

Description

testthat::expect_false() exists specifically for testing that an output is FALSE. testthat::expect_true() can also be used for such tests by negating the output, but it is better to use the tailored function instead. The reverse is also true – use expect_false(A) instead of expect_true(!A).

Usage

expect_not_linter()

Tags

best_practices, package_development, readability

See Also

linters for a complete list of linters available in lintr.


[Package lintr version 3.0.1 Index]