diff --git a/src/library/tools/R/check.R b/src/library/tools/R/check.R index fefd63df53f..21d192af485 100644 --- a/src/library/tools/R/check.R +++ b/src/library/tools/R/check.R @@ -4123,6 +4123,26 @@ add_dummies <- function(dir, Log) } } + if(R_check_vignette_titles) { + bad_vignettes <- character() + for(v in vigns$docs) { + if(trimws(vignetteInfo(v)$title == "Vignette Title")) + bad_vignettes <- c(bad_vignettes, v) + } + if(nb <- length(bad_vignettes)) { + if(!any) noteLog(Log) + any <- TRUE + msg <- ngettext(nb, + "Package vignette with placeholder title 'Vignette Title':\n", + "Package vignettes with placeholder title 'Vignette Title':\n", + domain = NA) + wrapLog(msg) + printLog0(Log, + .format_lines_with_indent(sQuote(basename(bad_vignettes))), + "\n") + } + } + if (!any) resultLog(Log, "OK") if (do_install && do_vignettes) { @@ -5830,6 +5850,9 @@ add_dummies <- function(dir, Log) R_check_things_in_check_dir <- config_val_to_logical(Sys.getenv("_R_CHECK_THINGS_IN_CHECK_DIR_", "FALSE")) + R_check_vignette_titles <- + config_val_to_logical(Sys.getenv("_R_CHECK_VIGNETTE_TITLES_", + "FALSE")) if (!nzchar(check_subdirs)) check_subdirs <- R_check_subdirs_strict @@ -5883,6 +5906,7 @@ add_dummies <- function(dir, Log) R_check_vignettes_skip_run_maybe <- TRUE R_check_serialization <- TRUE R_check_things_in_check_dir <- TRUE + R_check_vignette_titles <- TRUE } else { ## do it this way so that INSTALL produces symbols.rds ## when called from check but not in general.