ropensci / spelling

Tools for Spell Checking in R
https://docs.ropensci.org/spelling
Other
107 stars 25 forks source link

include .Rd files in spell_check_files #23

Closed gogonzo closed 5 years ago

gogonzo commented 5 years ago

Hi, is it possible to include checking .rd files in spell_check_files? Now, rd files are checked as plain text, so code objects are also checked for spelling.

I wonder if spell_check_file_one could have additional condition:

if (grepl(`\.rd$`, path, ignore.case = TRUE) {
  spell_check_file_rd(...)
}
jeroen commented 5 years ago

Are you aware that spell_check_package automatically checks all rd files in the man dir?

gogonzo commented 5 years ago

Yes I'm aware. Cause of my issue is that I've tried to run spell checking for each files seperately. This would allow run test parallelly and see in testthat output how many times spell_check_files run (how many files has been tested).

jeroen commented 5 years ago

Yeah I guess that makes sense. I think we just need to add spell_check_file_rd to this function: https://github.com/ropensci/spelling/blob/master/R/check-files.R#L32-L50. I'm surprised it isn't in there yet, perhaps an oversight. Can you make a pr and test it?

gogonzo commented 5 years ago

sure

gogonzo commented 5 years ago

thanks 👍