# will produce lints
lint(
text = "seq(length(x))",
linters = seq_linter()
)
lint(
text = "1:nrow(x)",
linters = seq_linter()
)
lint(
text = "dplyr::mutate(x, .id = 1:n())",
linters = seq_linter()
)
# okay
lint(
text = "seq_along(x)",
linters = seq_linter()
)
lint(
text = "seq_len(nrow(x))",
linters = seq_linter()
)
lint(
text = "dplyr::mutate(x, .id = seq_len(n()))",
linters = seq_linter()
)
Run the code above in your browser using DataLab