R/prep_spelling.R

Defines functions spelling

#' @include lists.R
#' @importFrom spelling spell_check_package

PREPS$spelling <- function(state, path = state$path, quiet) {
  wordlist <- file.path(path, "inst", "WORDLIST")
  if (!file.exists(wordlist)) {
    state$spelling <- "no_wordlist"
    if (!quiet) {
      cli::cli_inform(
        "Skipping spelling check: no {.file inst/WORDLIST} found."
      )
    }
    return(state)
  }
  run_prep_step(state, "spelling", function(path) {
    suppressMessages(spell_check_package(path))
  }, path = path, silent = quiet)
}

Try the goodpractice package in your browser

Any scripts or data that you put into this service are public.

goodpractice documentation built on June 5, 2026, 5:06 p.m.