repeat_linter: Repeat linter

View source: R/repeat_linter.R

repeat_linterR Documentation

Repeat linter

Description

Check that ⁠while (TRUE)⁠ is not used for infinite loops.

Usage

repeat_linter()

Tags

readability, style

See Also

linters for a complete list of linters available in lintr.

Examples

# will produce lints
lint(
  text = "while (TRUE) { }",
  linters = repeat_linter()
)


# okay
lint(
  text = "repeat { }",
  linters = repeat_linter()
)


r-lib/lintr documentation built on Dec. 20, 2024, 7:24 p.m.