# will produce lints
lint(
text = "expect_true(x > y)",
linters = expect_comparison_linter()
)
lint(
text = "expect_true(x <= y)",
linters = expect_comparison_linter()
)
lint(
text = "expect_true(x == (y == 2))",
linters = expect_comparison_linter()
)
# okay
lint(
text = "expect_gt(x, y)",
linters = expect_comparison_linter()
)
lint(
text = "expect_lte(x, y)",
linters = expect_comparison_linter()
)
lint(
text = "expect_identical(x, y == 2)",
linters = expect_comparison_linter()
)
lint(
text = "expect_true(x < y | x > y^2)",
linters = expect_comparison_linter()
)
Run the code above in your browser using DataLab