From fcade5bdc232dafd42eda4ed59a853d5a73f70bf Mon Sep 17 00:00:00 2001 From: Jim Hester Date: Thu, 18 Oct 2018 10:34:06 -0400 Subject: [PATCH] Update documentation for spell_check --- R/spell-check.R | 13 +++++-------- man/spell_check.Rd | 11 ++++------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/R/spell-check.R b/R/spell-check.R index 4db3ef5c6..96694a36f 100644 --- a/R/spell-check.R +++ b/R/spell-check.R @@ -3,18 +3,15 @@ #' 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. -#' manual pages. Hunspell includes dictionaries for `en_US` and `en_GB` -#' by default. Other languages require installation of a custom dictionary, see -#' the \href{https://cran.r-project.org/package=hunspell/vignettes/intro.html#system_dictionaries}{hunspell vignette} -#' for details. #' #' @export #' @rdname spell_check #' @param pkg package description, can be path or package name. See #' [as.package()] for more information -#' @param vignettes include vignettes in the spell check; passed to -#' \link[spelling:spell_check_package]{spelling::spell_check_package} -spell_check <- function(pkg = ".", vignettes = TRUE) { +#' @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 +#' @inheritParams spelling::spell_check_package +spell_check <- function(pkg = ".", vignettes = TRUE, use_wordlist = TRUE) { pkg <- as.package(pkg) - spelling::spell_check_package(pkg = pkg, vignettes = vignettes) + spelling::spell_check_package(pkg = pkg, vignettes = vignettes, use_wordlist = TRUE) } diff --git a/man/spell_check.Rd b/man/spell_check.Rd index 57bb2c3f4..0b723b49b 100644 --- a/man/spell_check.Rd +++ b/man/spell_check.Rd @@ -4,21 +4,18 @@ \alias{spell_check} \title{Spell checking} \usage{ -spell_check(pkg = ".", vignettes = TRUE) +spell_check(pkg = ".", vignettes = TRUE, use_wordlist = TRUE) } \arguments{ \item{pkg}{package description, can be path or package name. See \code{\link[=as.package]{as.package()}} for more information} -\item{vignettes}{include vignettes in the spell check; passed to -\link[spelling:spell_check_package]{spelling::spell_check_package}} +\item{vignettes}{also check all \code{rmd} and \code{rnw} files in the pkg \code{vignettes} folder} + +\item{use_wordlist}{ignore words in the package \link[spelling:get_wordlist]{WORDLIST} file} } \description{ 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. -manual pages. Hunspell includes dictionaries for \code{en_US} and \code{en_GB} -by default. Other languages require installation of a custom dictionary, see -the \href{https://cran.r-project.org/package=hunspell/vignettes/intro.html#system_dictionaries}{hunspell vignette} -for details. }