Diagnose Possibly Misspelled Words in DESCRIPTION
Source:R/diagnostics-description-text.R
lab_spelling.RdSpell-checks the Title and Description fields with utils::aspell(),
mirroring the aspell pass in CRAN's incoming check. It reports only words that
are not already accepted somewhere: a package .aspell/ dictionary,
inst/WORDLIST, or a Config/checktor/acronyms, software_names,
language_names or format_names field.
Value
checktor_check_result() with passed, issues, message; the
issues are the possibly-misspelled words.
Details
The check needs a spell-check backend (aspell or hunspell) on the system.
Without one it is reported as skipped, the same way CRAN's incoming check
skips spelling when no backend is present, so a run on one machine may find
words a run on another does not. It is therefore an opinion-tier check.
When it does fire, prescribe() hands back a ready-to-paste .aspell/
snippet with the flagged words filled in.
Source
The CRAN incoming check
runs aspell over the Title and Description; it needs a
spell-check backend and is noisy, so checktor keeps it at
opinion tier. See
vignette("check-sources", package = "checktor") for how every check maps to its
source.
Examples
# Needs aspell or hunspell; without one the check is skipped and finds nothing
pkg <- example_diagnose_scenario("description_examples/spelling_bad.txt",
show_content = FALSE)
lab_spelling(pkg, verbose = FALSE)$issues
#> character(0)
unlink(pkg, recursive = TRUE)