File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -6,21 +6,18 @@ check_options_documentation = function(rd_file) {
66 get_options_from_code = function () {
77 found = character (0 )
88
9- walk_ast = function (expr ) {
9+ walk_for_dt_options = function (expr ) {
1010 result = character (0 )
1111 if (is.call(expr ) && length(expr ) > = 2 && identical(expr [[1 ]], quote(getOption )) && is.character(expr [[2 ]]) && startsWith(expr [[2 ]], " datatable." )) {
1212 result = expr [[2 ]]
13- }
14- if (is.recursive(expr )) {
15- result = c(result , unlist(lapply(expr , walk_ast )))
13+ } else if (is.recursive(expr )) {
14+ result = c(result , unlist(lapply(expr , walk_for_dt_options )))
1615 }
1716 result
1817 }
1918 r_files = list.files(" R" , pattern = " \\ .R$" , full.names = TRUE )
2019 for (file in r_files ) {
21- tryCatch({
22- found = c(found , unlist(lapply(parse(file = file ), walk_ast )))
23- }, error = function (e ) {})
20+ found = c(found , unlist(lapply(parse(file = file ), walk_for_dt_options )))
2421 }
2522 sort(unique(found ))
2623 }
You can’t perform that action at this time.
0 commit comments