Consider
writeLines('
"a" %>%
c("b")
', tmp <- tempfile())
lintr::lint(tmp, lintr::unneeded_concatenation_linter)
# /tmp/Rtmp0PRc3M/fileacb8a79d41ebb:3:3: warning: Unneeded concatenation of a constant. Remove the "c" call.
# c("b")
# ^
Should we allow an exception for such cases?
The way to silence the linter is to use ., which may in fact be more readable:
writeLines('
"a" %>%
c( . ,"b")
', tmp <- tempfile())
lintr::lint(tmp, lintr::unneeded_concatenation_linter)
Consider
Should we allow an exception for such cases?
The way to silence the linter is to use
., which may in fact be more readable: