spaces_inside_linter {lintr} | R Documentation |
Spaces inside linter
Description
Check that parentheses and square brackets do not have spaces directly inside them, i.e., directly following an opening delimiter or directly preceding a closing delimiter.
Usage
spaces_inside_linter()
Tags
See Also
-
linters for a complete list of linters available in lintr.
Examples
# will produce lints
lint(
text = "c( TRUE, FALSE )",
linters = spaces_inside_linter()
)
lint(
text = "x[ 1L ]",
linters = spaces_inside_linter()
)
# okay
lint(
text = "c(TRUE, FALSE)",
linters = spaces_inside_linter()
)
lint(
text = "x[1L]",
linters = spaces_inside_linter()
)
[Package lintr version 3.1.2 Index]