I'm developing my first package and I noticed that usethis
has a function, use_spell_check()
, that adds a spell check to a package's tests. After running the function, it adds spelling.R
to the tests folder and it contains the following:
if(requireNamespace('spelling', quietly = TRUE))
spelling::spell_check_test(vignettes = TRUE, error = FALSE,
skip_on_cran = TRUE)
This all looks right, but I'm having trouble getting spelling::spell_check_test()
to return any output. When I run it in the console, I get NULL
. When I run devtools::check()
, there is a green check next to spelling.R
that indicates the script ran, but even with spelling mistakes, it doesn't seem to find them or print results. I know the spelling
package is working correctly because it works if I run the following:
> spelling::spell_check_package()
WORD FOUND IN
aa README.md:12
README.Rmd:22
Is there a setting in devtools::check()
I need to enable for the spell check to work as part of my tests?