Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Provide helper for missing returns/examples #2525

Open
hadley opened this issue Jul 11, 2023 · 0 comments
Open

Provide helper for missing returns/examples #2525

hadley opened this issue Jul 11, 2023 · 0 comments
Labels
feature a feature request or enhancement

Comments

@hadley
Copy link
Member

hadley commented Jul 11, 2023

path <- dir("man", pattern = "\\.Rd$", full.names = TRUE)
rd <- lapply(path, tools::parse_Rd, permissive = TRUE)

has_tag <- function(x, tag) {
  tags <- unlist(lapply(x, attr, "Rd_tag"))
  any(tags %in% paste0("\\", tag))
}

path[sapply(rd, \(x) !has_tag(x, "value"))]
path[sapply(rd, \(x) !has_tag(x, "examples"))]

Not sure where this should live.

@jennybc jennybc added the feature a feature request or enhancement label Nov 2, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants