# will produce lints
lint(
text = "!x == 2",
linters = comparison_negation_linter()
)
lint(
text = "!(x > 2)",
linters = comparison_negation_linter()
)
# okay
lint(
text = "!(x == 2 & y > 2)",
linters = comparison_negation_linter()
)
lint(
text = "!(x & y)",
linters = comparison_negation_linter()
)
lint(
text = "x != 2",
linters = comparison_negation_linter()
)
Run the code above in your browser using DataLab