Skip to contents

Check that no semicolons terminate expressions.

Usage

semicolon_linter(allow_compound = FALSE, allow_trailing = FALSE)

semicolon_terminator_linter(semicolon = c("compound", "trailing"))

Arguments

allow_compound

Logical, default FALSE. If TRUE, "compound" semicolons (e.g. as in x; y, i.e., on the same line of code) are allowed.

allow_trailing

Logical, default FALSE. If TRUE, "trailing" semicolons (i.e., those that terminate lines of code) are allowed.

semicolon

A character vector defining which semicolons to report:

compound

Semicolons that separate two statements on the same line.

trailing

Semicolons following the last statement on the line.

See also

linters for a complete list of linters available in lintr.
https://style.tidyverse.org/syntax.html#semicolons