Skip to content

Commit aa863ac

Browse files
committed
Filter dupes
1 parent fbef848 commit aa863ac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

R/spell-check.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ spell_check_package <- function(pkg = ".", vignettes = TRUE, lang = "en_GB", use
3131
add_words <- if(isTRUE(use_wordlist))
3232
get_wordlist(pkg$path)
3333
author <- strsplit(pkg$author, " ", fixed = TRUE)[[1]]
34-
ignore <- c(pkg$package, author, hunspell::en_stats, add_words)
34+
ignore <- unique(c(pkg$package, author, hunspell::en_stats, add_words))
3535

3636
# Create the hunspell dictionary object
37-
dict <- hunspell::dictionary(lang, add_words = ignore)
37+
dict <- hunspell::dictionary(lang, add_words = sort(ignore))
3838

3939
# Check Rd manual files
4040
rd_files <- list.files(file.path(pkg$path, "man"), "\\.rd$", ignore.case = TRUE, full.names = TRUE)

0 commit comments

Comments
 (0)