-
Notifications
You must be signed in to change notification settings - Fork 235
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
@param \dots are not recognized by @inheritParams #504
Labels
bug
an unexpected problem or unintended behavior
Comments
Could you please provide a minimal reprex? It certainly looks like the code is trying to handle this situation ( |
HenrikBengtsson
added a commit
to HenrikBengtsson/upkg
that referenced
this issue
Sep 20, 2016
Reproducible example for r-lib/roxygen2#504 (comment)
See https://github.com/HenrikBengtsson/upkg. It gives: > devtools::check()
Updating upkg documentation
Loading upkg
Setting env vars ---------------------------------------------------------------
CFLAGS : -Wall -pedantic
CXXFLAGS: -Wall -pedantic
Building upkg ------------------------------------------------------------------
'/usr/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet \
CMD build '/home/hb/repositories/upkg' --no-resave-data --no-manual
* checking for file ‘/home/hb/repositories/upkg/DESCRIPTION’ ... OK
* preparing ‘upkg’:
* checking DESCRIPTION meta-information ... OK
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
* building ‘upkg_1.0.tar.gz’
Setting env vars ---------------------------------------------------------------
_R_CHECK_CRAN_INCOMING_USE_ASPELL_: TRUE
_R_CHECK_CRAN_INCOMING_ : FALSE
_R_CHECK_FORCE_SUGGESTS_ : FALSE
Checking upkg ------------------------------------------------------------------
'/usr/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet \
CMD check '/tmp/RtmpjayEmT/upkg_1.0.tar.gz' --as-cran --timings --no-manual
* using log directory ‘/tmp/RtmpjayEmT/upkg.Rcheck’
* using R version 3.3.1 (2016-06-21)
* using platform: x86_64-pc-linux-gnu (64-bit)
* using session charset: UTF-8
* using options ‘--no-manual --as-cran’
* checking for file ‘upkg/DESCRIPTION’ ... OK
* this is package ‘upkg’ version ‘1.0’
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking whether package ‘upkg’ can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking loading without being on the library search path ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd line widths ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... WARNING
Duplicated \argument entries in documentation object 'bar':
‘...’
Functions with \usage entries need to have the appropriate \alias
entries, and all their arguments documented.
The \usage entries must correspond to syntactically valid R code.
See chapter ‘Writing R documentation files’ in the ‘Writing R
Extensions’ manual.
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking examples ... NONE
* DONE
Status: 1 WARNING
See
‘/tmp/RtmpjayEmT/upkg.Rcheck/00check.log’
for details.
R CMD check results
0 errors | 1 warning | 0 notes
checking Rd \usage sections ... WARNING
Duplicated \argument entries in documentation object 'bar':
‘...’
Functions with \usage entries need to have the appropriate \alias
entries, and all their arguments documented.
The \usage entries must correspond to syntactically valid R code.
See chapter ‘Writing R documentation files’ in the ‘Writing R
Extensions’ manual. |
A minimal reprex (e.g. ~10 line snippet of R code) would really make it faster for me to debug this. |
dir.create("R")
cat(file="R/foo.R", "
#' Foo something
#'
#' @param x An object.
#' @param y Another object.
#' @param \\dots Not used.
#'
#' @export
foo <- function(x=1, y=2, ...) list(x=x, y=y)
#' Bar something
#'
#' @inheritParams foo
#' @param \\dots Additional arguments passed to foo().
#'
#' @export
bar <- function(x=1, ...) foo(x=x, ...)
")
cat(file="DESCRIPTION", 'Authors@R: c(person("John", "Doe", role="cre", email="john@doe.org"))')
roxygen2::roxygenize(".", roclets="rd") Look at > cat(readLines("man/bar.Rd"), sep="\n")
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/foo.R
\name{bar}
\alias{bar}
\title{Bar something}
\usage{
bar(x = 1, ...)
}
\arguments{
\item{x}{An object.}
\item{...}{Not used.}
\item{\dots}{Additional arguments passed to foo().}
}
\description{
Bar something
} |
HenrikBengtsson
added a commit
to HenrikBengtsson/upkg
that referenced
this issue
Sep 21, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For roxygen2 5.0.1, when using
and the
from
file already contains anotherthen
@inheritParams
fails to drop duplicate\dots
resulting in anR CMD check
warning:This is not the case if one uses
@param ...
instead of@param \dots
. It looks like@inheritParams
is not aware of the\dots
alternative to...
.The text was updated successfully, but these errors were encountered: