File: spell-check.R

package info (click to toggle)
r-cran-devtools 2.4.6-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,340 kB
  • sloc: sh: 15; makefile: 5
file content (16 lines) | stat: -rw-r--r-- 690 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#' Spell checking
#'
#' Runs a spell check on text fields in the package description file, manual
#' pages, and optionally vignettes. Wraps the \link[spelling:spell_check_package]{spelling}
#' package.
#'
#' @export
#' @rdname spell_check
#' @template devtools
#' @param vignettes also check all `rmd` and `rnw` files in the pkg `vignettes` folder
#' @param use_wordlist ignore words in the package [WORDLIST][spelling::get_wordlist] file
spell_check <- function(pkg = ".", vignettes = TRUE, use_wordlist = TRUE) {
  rlang::check_installed("spelling")
  pkg <- as.package(pkg)
  spelling::spell_check_package(pkg = pkg, vignettes = vignettes, use_wordlist = use_wordlist)
}