Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

R6 method documentation with returns tag #1652

Open
pvanlaake opened this issue Aug 31, 2024 · 1 comment
Open

R6 method documentation with returns tag #1652

pvanlaake opened this issue Aug 31, 2024 · 1 comment

Comments

@pvanlaake
Copy link

pvanlaake commented Aug 31, 2024

When using the returns tag in the documentation of an R6 method, the text is rendered in the "Value" section of the class description (and not the method description). returns is indeed not listed in r6_tags:

topic_add_r6_methods <- function(rd, block, env) {
  r6data <- block_get_tag_value(block, ".r6data")
  self <- r6data$self
  methods <- self[self$type == "method", ]
  methods <- methods[order(methods$file, methods$line), ]
  methods$tags <- replicate(nrow(methods), list(), simplify = FALSE)

  r6_tags <- c("description", "details", "param", "return", "examples") # <<<<<<<<<<<<

  (...)

Is this something that could be added easily? I prefer to use returns by default in all of my code "because it reads more naturally" (footnote 10 in section 16.4 of R Packages).

@olivroy
Copy link
Contributor

olivroy commented Sep 2, 2024

This is a duplicate of #1148

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants