Skip to content

@inheritParams with NULL doc targetsΒ #836

@kenahoo

Description

@kenahoo

I have the following docs:

#' First function
#'
#' @name funcOne
#' @rdname funcOne
#' @usage
#' funcOne(name,
#'         deps)
#'
#' @param name name of the artifact
#' @param deps names of other artifacts this artifact depends on
NULL

#' Second function
#'
#' @name funcTwo
#' @rdname funcTwo
#' @usage
#' funcTwo(name,
#'         deps,
#'         create,
#'         ...)
#'
#' @inheritParams funcOne  // TODO Doesn't work yet
#' @param create function to create this artifact object from its dependency objects
#' @param ... further arguments passed to \code{\link{foo}}
NULL

The @inheritParams directive doesn't have the desired effect, no parameters are inherited from funcOne:

% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/docs-test.R
\name{funcTwo}
\alias{funcTwo}
\title{Second function}
\usage{
funcTwo(name,
        deps,
        create,
        ...)
}
\arguments{
\item{create}{function to create this artifact object from its dependency objects}

\item{...}{further arguments passed to \code{\link{foo}}}
}
\description{
Second function
}

Some notes:

  • If I change @inheritParams to something bogus like @inheritTheWind, I get a proper Warning: @inheritTheWind [/Users/kwilliams/git/GroveR/R/docs-test.R#25]: unknown tag, so I do know the original tag is at least being recognized as legitimate
  • If I change @inheritParams funcOne to a bogus @inheritParams foo, no warning is printed - this makes me suspect my original example is silently not finding the funcOne parameters too.

So two questions:

  1. How can I get this working as desired?
  2. When @inheritParams can't find the specified target, can it spit out a warning/error that might help track down the problem?

Thanks.

(NB- this issue adapted from #835. I'm trying to use this NULL style of docs because the things I'm documenting are actually R6 objects defined a particular way.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions