Skip to content

Unclear warning of missing @description value #710

@FelixErnst

Description

@FelixErnst

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancementrd ✍️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions