Am 10.07.25 um 12:13 schrieb Ghislain Durif:
Upon my last resubmission to CRAN, some issues regarding some man pages
(that I obviously missed) were found, e.g. function doc without a
\value{} tag, or examples for (purposely) unexported functions.
These issues were not raised during package check (with or without
`--as-cran` flag).
tools::checkRdContents() et al. (see ?tools::QC), used by R CMD check,
don't currently check help pages for these things. I suppose there would
be too many false alarms so this is manually reviewed by the
CRAN-submissions team.
The code base is quite large, and I would be very interested in any tool
that could help me check the man pages more thoroughly than a package
check ?
Here is quick-and-dirty code that uses 'tools'-internal helper functions
to find names of Rd files that might deserve a \value section -- given
an installed PACKAGE (as a character string):
##PACKAGE <- "rkeops"
functions <- lsf.str(envir = getNamespace(PACKAGE))
tools::Rd_db(PACKAGE) |>
Filter(f = function (rd) {
sections <- tools:::RdTags(rd)
aliases <- tools:::.Rd_get_metadata(rd, "alias")
!"\\value" %in% sections && (
"\\arguments" %in% sections ||
any(aliases %in% functions)
)
}) |>
names()
--
Sebastian Meyer
______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel