Skip to content

Commit e4fdcd4

Browse files
committed
bring back extract_call for the assignment check
1 parent 4ea2ae2 commit e4fdcd4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

R/utils-get_code_dependency.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ get_code_dependency <- function(code, names, check_names = TRUE) {
3939
pd <- normalize_pd(utils::getParseData(parsed_code))
4040
symbols <- pd[pd$token == "SYMBOL", "text"]
4141
if (any(pd$text == "assign")) {
42+
calls_pd <- extract_calls(pd)
4243
assign_calls <- Filter(function(call) find_call(call, "assign"), calls_pd)
4344
ass_str <- unlist(lapply(assign_calls, function(call) call[call$token == "STR_CONST", "text"]))
4445
ass_str <- gsub("^['\"]|['\"]$", "", ass_str)

0 commit comments

Comments
 (0)