Skip to content

Commit

Permalink
TODO comment
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelChirico committed Mar 4, 2025
1 parent 5964307 commit 71ddfbe
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
19 changes: 13 additions & 6 deletions .lintr
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,19 @@ linters: all_linters(
line_length_linter(120L),
object_overwrite_linter(allow_names = c("line", "lines", "pipe", "symbols")),
todo_comment_linter(
except_regex = rex::rex(
"TODO(",
# GitHub issue number #1234, possibly from another repo org/repo#5678
maybe(one_or_more(character_class("a-zA-Z0-9-")), "/", one_or_more(character_class("a-zA-Z0-9._-"))),
"#", one_or_more(digit),
")"
except_regex = c(
rex::rex(
"TODO(",
# GitHub issue number #1234, possibly from another repo org/repo#5678
maybe(one_or_more(character_class("a-zA-Z0-9-")), "/", one_or_more(character_class("a-zA-Z0-9._-"))),
"#", one_or_more(digit),
")"
),
rex::rex(
"TODO(",
"R>", maybe("="), digit, ".", digit, maybe(".", digit),
")"
)
)
),
undesirable_function_name_linter = undesirable_function_linter(modify_defaults(
Expand Down
3 changes: 2 additions & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# backports approach doesn't work since we need this before .onLoad() in names2()
# TODO(R>=4.4.0): remove this.
# NB: {backports} approach doesn't work since we need this before .onLoad() in names2()
if (!exists("%||%", "package:base")) {
`%||%` <- function(x, y) if (is.null(x)) y else x # nolint: coalesce_linter.
}
Expand Down

0 comments on commit 71ddfbe

Please sign in to comment.