# will produce lints
lint(
text = "sapply(x, length)",
linters = lengths_linter()
)
lint(
text = "vapply(x, length, integer(1L))",
linters = lengths_linter()
)
lint(
text = "purrr::map_int(x, length)",
linters = lengths_linter()
)
# okay
lint(
text = "lengths(x)",
linters = lengths_linter()
)
Run the code above in your browser using DataLab