# will produce lints
lint(
text = "1:3 |> mean() %>% as.character()",
linters = pipe_consistency_linter()
)
lint(
text = "1:3 %>% mean() %>% as.character()",
linters = pipe_consistency_linter("|>")
)
# okay
lint(
text = "1:3 %>% mean() %>% as.character()",
linters = pipe_consistency_linter()
)
lint(
text = "1:3 |> mean() |> as.character()",
linters = pipe_consistency_linter()
)
Run the code above in your browser using DataLab