File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change 1313# ' pattern = "\\.(Rnw|Rmd|html)$", full.names = TRUE)
1414# ' spell_check_files(files)
1515spell_check_files <- function (path , ignore = character (), lang = " en_GB" ){
16+ stopifnot(is.character(ignore ))
1617 dict <- hunspell :: dictionary(lang , add_words = ignore )
1718 path <- normalizePath(path , mustWork = TRUE )
1819 lines <- lapply(sort(path ), spell_check_file_one , dict = dict )
@@ -37,6 +38,7 @@ spell_check_file_one <- function(path, dict){
3738# ' @export
3839# ' @param text character vector with plain text
3940spell_check_text <- function (text , ignore = character (), lang = " en_GB" ){
41+ stopifnot(is.character(ignore ))
4042 dict <- hunspell :: dictionary(lang , add_words = ignore )
4143 bad_words <- hunspell :: hunspell(text , dict = dict )
4244 words <- sort(unique(unlist(bad_words )))
You can’t perform that action at this time.
0 commit comments