# will produce lints
lint(
text = "x %>% mutate(a = 1) %>% mutate(b = 2)",
linters = consecutive_mutate_linter()
)
# okay
lint(
text = "x %>% mutate(a = 1, b = 2)",
linters = consecutive_mutate_linter()
)
code <- "library(dbplyr)\nx %>% mutate(a = 1) %>% mutate(a = a + 1)"
writeLines(code)
lint(
text = code,
linters = consecutive_mutate_linter()
)
Run the code above in your browser using DataLab