Skip to content

Commit

Permalink
Optionally note vignettes with placeholder titles.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/trunk@76708 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
hornik committed Jun 18, 2019
1 parent 7c5764d commit fb188c0
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/library/tools/R/check.R
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit fb188c0

Please sign in to comment.