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

@InheritDotParams generates CRAN NOTE when nothing to inherit #1671

Open
robchallen opened this issue Oct 15, 2024 · 0 comments · May be fixed by #1672
Open

@InheritDotParams generates CRAN NOTE when nothing to inherit #1671

robchallen opened this issue Oct 15, 2024 · 0 comments · May be fixed by #1672

Comments

@robchallen
Copy link

Just been asked by CRAN to fix documentation in my package, which generated the following warnings:

Found the following HTML validation problems:
  p_mutate.html:56:1 (p_mutate.Rd:17): Warning: trimming empty <dt>

This seems to be a new check and were the result of me using @inheritDotParams where there were no additional parameters to inherit. For example:

#' A base function
#'
#' @param x a parameter
#' @param ... not used at present but might be extended in the future
#'
#' @return something
#' @export
#'
#' @examples
#' print("hi")
test_fn_one = function(x, ...) {

}


#' @param y additional parameter
#' @inherit test_fn_one
#' @inheritDotParams test_fn_one
test_fn_two = function(x, y, ...) {
  # do something with y
  test_fn_one(x, ...)
}

Generates a test_fn_two.Rd file that contains the following .Rd:

<snip>

\item{...}{
  Arguments passed on to \code{\link[=test_fn_one]{test_fn_one}}
  \describe{
    \item{\code{}}{}
  }}
}

<snip>

The empty \describe block seems to cause CRAN issues. I can work around this by removing the @inheritDotParams directive in test_fn_two but that breaks future proofing for changes in test_fn_one. Is there another way to approach this?
Many thanks. N.B. issue [#1670 ] is I think a connected problem.

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

Successfully merging a pull request may close this issue.

1 participant