# will produce lints
lint(
text = "(1:10) %>% sum()",
linters = one_call_pipe_linter()
)
lint(
text = "DT %>% .[grp == 'a', sum(v)]",
linters = one_call_pipe_linter()
)
# okay
lint(
text = "rowSums(x) %>% mean()",
linters = one_call_pipe_linter()
)
lint(
text = "DT[src == 'a', .N, by = grp] %>% .[N > 10]",
linters = one_call_pipe_linter()
)
# assignment pipe is exempted
lint(
text = "DF %<>% mutate(a = 2)",
linters = one_call_pipe_linter()
)
Run the code above in your browser using DataLab