Skip to content

Commit

Permalink
Run more checks on vignette meta-information (amends c64014).
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/trunk@86935 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
hornik committed Jul 30, 2024
1 parent e2b33a9 commit a053afc
Showing 1 changed file with 25 additions and 5 deletions.
30 changes: 25 additions & 5 deletions src/library/tools/R/check.R
Original file line number Diff line number Diff line change
Expand Up @@ -1235,16 +1235,36 @@ add_dummies <- function(dir, Log)
strwrap(sQuote(db$file[!keep]), indent = 2L, exdent = 2L))
printLog0(Log, paste(msg, collapse = "\n"), "\n")
}
pdfs <- file.path("inst", "doc", db[keep, ]$PDF)
missing <- !file.exists(pdfs)
if(any(missing)) {
elts <- file.path("inst", "doc", db[keep, ]$PDF)
miss <- !file.exists(elts)
if(any(miss)) {
if(!any) warningLog(Log)
any <- TRUE
msg <- c("Output(s) listed in 'build/vignette.rds' but not in package:",
strwrap(sQuote(pdfs[missing]), indent = 2L, exdent = 2L))
strwrap(sQuote(elts[miss]), indent = 2L, exdent = 2L))
printLog0(Log, paste(msg, collapse = "\n"), "\n")
}
if (!any) resultLog(Log, "OK")
elts <- db[keep, ]$File
miss <- (nzchar(elts) &
!file.exists(file.path("inst", "doc", elts)))
if(any(miss)) {
if(!any) warningLog(Log)
any <- TRUE
msg <- c("Source(s) listed in 'build/vignette.rds' but not in package:",
strwrap(sQuote(elts[miss]), indent = 2L, exdent = 2L))
printLog0(Log, paste(msg, collapse = "\n"), "\n")
}
elts <- db[keep, ]$R
miss <- (nzchar(elts) &
!file.exists(file.path("inst", "doc", elts)))
if(any(miss)) {
if(!any) warningLog(Log)
any <- TRUE
msg <- c("R code(s) listed in 'build/vignette.rds' but not in package:",
strwrap(sQuote(elts[miss]), indent = 2L, exdent = 2L))
printLog0(Log, paste(msg, collapse = "\n"), "\n")
}
if(!any) resultLog(Log, "OK")
}

check_top_level <- function()
Expand Down

0 comments on commit a053afc

Please sign in to comment.