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

Unclear warning of missing @description value #710

Closed
FelixErnst opened this issue Feb 6, 2018 · 2 comments
Closed

Unclear warning of missing @description value #710

FelixErnst opened this issue Feb 6, 2018 · 2 comments
Labels
feature a feature request or enhancement rd ✍️

Comments

@FelixErnst
Copy link

When using the following R code as the whole content of a single hello.R file residing in the R folder of a default package structure (e.g. the test package from Rstudio) a warning "Warning: @description [hello.R#1]: requires a value" is generated, when running roxygen using devtools::document(roclets=c('rd', 'collate', 'namespace')).

#'
#' @name testClass
#' @title testClass
#'
#' @slot one character.
#' @slot two numeric.
#'
#' @export
setClass("testClass",
                      slots = c("one" = "character",
                                "two" = "numeric"),
                      prototype = c("one" = "fump",
                                    "two" = 6))

It is fixed by removing the first line of roxygen comment. The following code does not produce the warning:

#' @name testClass
#' @title testClass
#'
#' @slot one character.
#' @slot two numeric.
#'
#' @export
setClass("testClass",
                      slots = c("one" = "character",
                                "two" = "numeric"),
                      prototype = c("one" = "fump",
                                    "two" = 6))

It seems to me, that the warning is at least misleading. It maybe a bug, since the difference between the two coding blocks is not existant.

@RBhupi
Copy link

RBhupi commented May 11, 2018

I got the same warning. You are right about it being misleading.

@hadley
Copy link
Member

hadley commented Jun 28, 2018

Minimal reprex:

library(roxygen2)
out <- roc_proc_text(rd_roclet(),
"
#'
f <- function() {}
")
#> Warning: @title [/tmp/RtmpEYCbKU/file101295a2d86d8#1]: requires a value

Created on 2019-08-12 by the reprex package (v0.3.0)

@hadley hadley added the feature a feature request or enhancement label Jun 28, 2018
@hadley hadley closed this as completed in df5f71a Aug 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement rd ✍️
Projects
None yet
Development

No branches or pull requests

3 participants