Learn R Programming

lintr (version 3.1.2)

repeat_linter: Repeat linter

Description

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

Usage

repeat_linter()

Arguments

Tags

readability, style

See Also

linters for a complete list of linters available in lintr.

Examples

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


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

Run the code above in your browser using DataLab