# will produce lints
lint(
text = "any(is.na(x), na.rm = TRUE)",
linters = any_is_na_linter()
)
lint(
text = "any(is.na(foo(x)))",
linters = any_is_na_linter()
)
# okay
lint(
text = "anyNA(x)",
linters = any_is_na_linter()
)
lint(
text = "anyNA(foo(x))",
linters = any_is_na_linter()
)
lint(
text = "any(!is.na(x), na.rm = TRUE)",
linters = any_is_na_linter()
)
Run the code above in your browser using DataLab