Skip to content

Commit

Permalink
🔄 Synced local 'scripts/spell-check.R' with remote 'scripts/spell-che…
Browse files Browse the repository at this point in the history
…ck.R'

release-null
  • Loading branch information
cansavvy committed Jan 12, 2022
1 parent cc5f629 commit 3f6376b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/spell-check.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ dictionary <- readLines(file.path(root_dir, 'resources', 'dictionary.txt'))
# Add mysterious emoji joining character
dictionary <- c(dictionary, spelling::spell_check_text("⬇️")$word)

# Only declare `.Rmd` files
# Only declare `.Rmd` files but not the ones in the style-sets directory
files <- list.files(pattern = 'Rmd$', recursive = TRUE, full.names = TRUE)
files <- grep("About.Rmd", files, ignore.case = TRUE, invert = TRUE, value = TRUE)
files <- grep("style-sets", files, ignore.case = TRUE, invert = TRUE, value = TRUE)

# Run spell check
sp_errors <- spelling::spell_check_files(files, ignore = dictionary) %>%
Expand Down

0 comments on commit 3f6376b

Please sign in to comment.