Skip to content

Commit 08a861a

Browse files
simplify again: remove a helper
1 parent d2a2eb0 commit 08a861a

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

.ci/linters/rd/options_doc_check.R

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ check_options_documentation = function(rd_file) {
2222

2323
# Find options in documentation
2424
walk_rd = function(rd_element) {
25-
result = character(0)
25+
result = character()
2626
if (!is.list(rd_element)) return(character())
2727
if (isTRUE(attr(rd_element, "Rd_tag") == "\\code") && length(rd_element) >= 1L) {
2828
content = rd_element[[1L]]
@@ -32,18 +32,13 @@ check_options_documentation = function(rd_file) {
3232
}
3333
c(result, unlist(lapply(rd_element, walk_rd)))
3434
}
35-
get_options_from_doc = function(rd_file) {
36-
if (!file.exists(rd_file)) return(character(0))
37-
38-
rd_file |>
39-
tools::parse_Rd() |>
40-
walk_rd() |>
41-
unique() |>
42-
sort()
43-
}
4435

4536
code_opts = get_options_from_code()
46-
doc_opts = get_options_from_doc(rd_file)
37+
doc_opts = rd_file |>
38+
tools::parse_Rd() |>
39+
walk_rd() |>
40+
unique() |>
41+
sort()
4742
code_opts = setdiff(code_opts, "datatable.alloc")
4843

4944
miss_in_doc = setdiff(code_opts, doc_opts)

0 commit comments

Comments
 (0)