# will produce lints
lint(
text = "stopifnot(x); stopifnot(y)",
linters = consecutive_assertion_linter()
)
lint(
text = "assert_that(x); assert_that(y)",
linters = consecutive_assertion_linter()
)
# okay
lint(
text = "stopifnot(x, y)",
linters = consecutive_assertion_linter()
)
lint(
text = 'assert_that(x, msg = "Bad x!"); assert_that(y)',
linters = consecutive_assertion_linter()
)
Run the code above in your browser using DataLab