# will produce lints
lint(
text = "x + y # TOODOO",
linters = todo_comment_linter(todo = "toodoo")
)
lint(
text = "pi <- 1.0 # FIIXMEE",
linters = todo_comment_linter(todo = "fiixmee")
)
lint(
text = "x <- TRUE # TOODOO(#1234): Fix this hack.",
linters = todo_comment_linter()
)
# okay
lint(
text = "x + y # my informative comment",
linters = todo_comment_linter()
)
lint(
text = "pi <- 3.14",
linters = todo_comment_linter()
)
lint(
text = "x <- TRUE",
linters = todo_comment_linter()
)
lint(
text = "x <- TRUE # TODO(#1234): Fix this hack.",
linters = todo_comment_linter(except_regex = "TODO\\(#[0-9]+\\):")
)
Run the code above in your browser using DataLab