ropensci / spelling

Tools for Spell Checking in R
https://docs.ropensci.org/spelling
Other
105 stars 27 forks source link

WISH: Add support for .aspell/defaults.R and .aspell/WORDLIST.rds #64

Open HenrikBengtsson opened 2 years ago

HenrikBengtsson commented 2 years ago

Background

Per help("aspell-utils", package = "utils"), it's possible to add custom dictionaries controlled via .aspell/defaults.R, e.g.

Rd_files <- vignettes <- R_files <- description <-
    list(encoding = "UTF-8",
         language = "en",
         dictionaries = c("en_stats", "WORDLIST"))

where WORDLIST refers to .aspell/WORDLIST.rds, which comprise an acceptance word list, e.g.

saveRDS(accepted_words, file = ".aspell/WORDLIST.rds", version = 2L)

This can be used to avoid R CMD check --as-cran NOTEs (which often are reported by the win-builder or CRAN Incoming services), e.g. Possibly mis-spelled words in DESCRIPTION: ...

Wish

It would be great if spelling could provide "standards" and functions for setting this up.

Also, maybe spelling could fall back to .aspell/WORDLIST.rds, if inst/WORDLIST is not found.

References