repeat_linter {lintr}R 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()
)


[Package lintr version 3.1.2 Index]