View source: R/pipe_consistency_linter.R
pipe_consistency_linter | R Documentation |
Check that pipe operators are used consistently by file, or optionally specify one valid pipe operator.
pipe_consistency_linter(pipe = c("auto", "%>%", "|>"))
pipe |
Which pipe operator is valid (either |
configurable, readability, style
linters for a complete list of linters available in lintr.
# 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()
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.