# will produce lints
lint(
text = "stopifnot(all(x > 0))",
linters = stopifnot_all_linter()
)
lint(
text = "stopifnot(y > 3, all(x < 0))",
linters = stopifnot_all_linter()
)
# okay
lint(
text = "stopifnot(is.null(x) || all(x > 0))",
linters = stopifnot_all_linter()
)
lint(
text = "assert_that(all(x > 0))",
linters = stopifnot_all_linter()
)
Run the code above in your browser using DataLab