Skip to content

Commit 88ce984

Browse files
for all condition rather errors only
1 parent 390fda6 commit 88ce984

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.ci/linters/rd/condition_class_docs_check.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ condition_classes_documentation_linter = function(rd_file) {
44

55
# Find condition classes in R code
66
walk_r_ast_for_classes = function(expr) {
7-
if (is.call(expr) && length(expr) >= 2L && identical(expr[[1L]], quote(stopf)) && "class" %in% names(expr) && is.character(class_arg <- expr[["class"]]) && startsWith(class_arg, "dt_") && endsWith(class_arg, "_error")) {
7+
if (is.call(expr) && length(expr) >= 2L && identical(expr[[1L]], quote(stopf)) && "class" %in% names(expr) && is.character(class_arg <- expr[["class"]]) && startsWith(class_arg, "dt_")) {
88
class_arg
99
} else if (is.recursive(expr)) {
1010
unlist(lapply(expr, walk_r_ast_for_classes))
@@ -18,7 +18,7 @@ condition_classes_documentation_linter = function(rd_file) {
1818
result = character()
1919
if (isTRUE(attr(rd_element, "Rd_tag") == "\\code") && length(rd_element) >= 1L) {
2020
content = rd_element[[1L]]
21-
if (is.character(content) && startsWith(content, "dt_") && endsWith(content, "_error")) {
21+
if (is.character(content) && startsWith(content, "dt_")) {
2222
result = content
2323
}
2424
}

0 commit comments

Comments
 (0)