Diagnose Possibly Misspelled Words in DESCRIPTION
Source:R/diagnostics-description.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 or software_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 passes quietly, 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
pkg <- example_diagnose_scenario("code_examples/tf_usage_bad.R",
show_content = FALSE)
lab_spelling(pkg, verbose = FALSE)$passed
#> [1] TRUE