# will produce lints
lint(
text = "length(which(x == y)) == 0L",
linters = boolean_arithmetic_linter()
)
lint(
text = "sum(grepl(pattern, x)) == 0",
linters = boolean_arithmetic_linter()
)
# okay
lint(
text = "!any(x == y)",
linters = boolean_arithmetic_linter()
)
lint(
text = "!any(grepl(pattern, x))",
linters = boolean_arithmetic_linter()
)
Run the code above in your browser using DataLab