# will produce lints
lint(
text = "any(duplicated(x), na.rm = TRUE)",
linters = any_duplicated_linter()
)
lint(
text = "length(unique(x)) == length(x)",
linters = any_duplicated_linter()
)
# okay
lint(
text = "anyDuplicated(x)",
linters = any_duplicated_linter()
)
lint(
text = "anyDuplicated(x) == 0L",
linters = any_duplicated_linter()
)
Run the code above in your browser using DataLab