Skip to content

Provide an opt-in way to warn if exported functions are missing @examples or @returns #1334

@DavisVaughan

Description

@DavisVaughan

This is particularly important for a first CRAN release, where this goes by silently in R CMD Check but is something CRAN will reject you for 100% of the time.

It could be part of the roxygen note bits we put in the DESCRIPTION file, like:

  • Roxygen: list(markdown = TRUE, warn_no_return = TRUE, warn_no_examples = TRUE)
  • Hadley also suggested it may be a bit more general, like cran_warnings = TRUE

Then usethis::create_package() could set this for you automatically, or some other related usethis function.

This comes up a lot:

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