Skip to content

Commit 7694219

Browse files
simplify by checking string
1 parent 5244b56 commit 7694219

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.ci/linters/rd/condition_class_docs_check.R

Lines changed: 1 addition & 1 deletion
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) && expr[[1L]] %in% list(quote(stopf), quote(warningf), quote(messagef), quote(packageStartupMessagef)) && is.character(class_arg <- expr[["class"]]) && startsWith(class_arg, "dt_")) {
7+
if (is.call(expr) && is.name(e <- expr[[1L]]) && as.character(e) %in% c("stopf", "warningf", "messagef", "packageStartupMessagef") && 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))

0 commit comments

Comments
 (0)