View source: R/box_trailing_commas_linter.R
| box_trailing_commas_linter | R Documentation |
box library trailing commas linterChecks that all box:use imports have a trailing comma. This applies to
package or module imports between ( and ), and, optionally, function imports between
[ and ]. Take note that lintr::commas_linter() may come into play.
box_trailing_commas_linter(check_functions = FALSE)
check_functions |
Boolean flag to include function imports between |
For use in rhino, see the
Explanation: Rhino style guide
to learn about the details.
A custom linter function for use with r-lib/lintr
# will produce lints
lintr::lint(
text = "box::use(base, rlang)",
linters = box_trailing_commas_linter()
)
lintr::lint(
text = "box::use(
dplyr[select, mutate]
)",
linters = box_trailing_commas_linter()
)
# okay
lintr::lint(
text = "box::use(base, rlang, )",
linters = box_trailing_commas_linter()
)
lintr::lint(
text = "box::use(
dplyr[select, mutate],
)",
linters = box_trailing_commas_linter()
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.