roxygen2 icon indicating copy to clipboard operation
roxygen2 copied to clipboard

`@format` cannot be inherited

Open netique opened this issue 3 years ago • 2 comments

I want to inherit a format tag from a dataset of foreign package, but @inherit foo::bar format seems to do nothing. Minimal example (functions in the same NS):

library(roxygen2)
roc_proc_text(rd_roclet(), "
#' Foo
#' 
#' @format BLAH
foo <- function() {}

#' Bar
#' 
#' @inherit foo format
bar <-  function(x){}
")

This also seems to affect example and example tags.

netique avatar Feb 23 '22 16:02 netique

Not exactly nothing: it tells you that format isn't supported yet:

library(roxygen2)
x <- roc_proc_text(rd_roclet(), "
#' Foo
#' 
#' @format BLAH
foo <- function() {}

#' Bar
#' 
#' @inherit foo format
bar <-  function(x){}
")
#> Warning: [<text>:9] @inherit Unknown inherit type: format

Created on 2022-04-06 by the reprex package (v2.0.1)

hadley avatar Apr 06 '22 11:04 hadley

Ahh, my bad, missed that somehow.

netique avatar Apr 06 '22 12:04 netique