Skip to content

Commit

Permalink
Catch errors from running aspell().
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/trunk@84715 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
hornik committed Jul 21, 2023
1 parent f145419 commit f0b5bf6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/library/tools/R/QC.R
Original file line number Diff line number Diff line change
Expand Up @@ -7383,8 +7383,11 @@ function(dir, localOnly = FALSE, pkgSize = NA)
startsWith(language, "en-")) &&
config_val_to_logical(Sys.getenv("_R_CHECK_CRAN_INCOMING_USE_ASPELL_",
"FALSE"))) {
a <- .aspell_package_description_for_CRAN(dir)
if(NROW(a))
a <- tryCatch(.aspell_package_description_for_CRAN(dir),
error = identity)
if(inherits(a, "error"))
out$aspell_package_description_error <- conditionMessage(a)
else if(NROW(a))
out$spelling <- a
}

Expand Down Expand Up @@ -8508,6 +8511,9 @@ function(x, ...)
}))),
collapse = "\n")
})),
if(length(y <- x$aspell_package_description_error)) {
paste(y, collapse = "\n")
},
if(NROW(y <- x$spelling)) {
s <- split(sprintf("%d:%d", y$Line, y$Column), y$Original)
paste(c("Possibly misspelled words in DESCRIPTION:",
Expand Down

0 comments on commit f0b5bf6

Please sign in to comment.