22
33" Spell check for files
44Usage:
5- spell-check [--lang=<language>] [--no-update ] <files>...
5+ spell-check [--lang=<language>] [--read-only ] <files>...
66
77Options:
88 --lang=<language> Passed to `spelling::spell_check_files()` [default: en_US]
9- --no-update Don't update inst/WORDLIST with errors (new words)
9+ --read-only Don't update inst/WORDLIST with errors (new words)
1010
1111" - > doc
1212
@@ -17,7 +17,7 @@ if (file.exists(path_wordlist)) {
1717 ignore <- readLines(path_wordlist , encoding = " UTF-8" )
1818 action <- " update"
1919} else {
20- if (isFALSE(arguments $ no_update )) {
20+ if (isFALSE(arguments $ read_only )) {
2121 if (! dir.exists(dirname(path_wordlist ))) {
2222 dir.create(dirname(path_wordlist ))
2323 }
@@ -37,8 +37,8 @@ spelling_errors <- spelling::spell_check_files(
3737if (nrow(spelling_errors ) > 0 ) {
3838 cat(" The following spelling errors were found:\n " )
3939 print(spelling_errors )
40- if (isTRUE(arguments $ no_update )) {
41- cat(" Hint: you can enable an automatic updating of WORDLIST with errors (new words) by removing the --no-update flag.\n " )
40+ if (isTRUE(arguments $ read_only )) {
41+ cat(" Hint: you can enable an automatic updating of WORDLIST with errors (new words) by removing the --read-only flag.\n " )
4242 } else {
4343 ignore_df <- data.frame (
4444 original = unique(c(ignore , spelling_errors $ word ))
@@ -55,7 +55,7 @@ if (nrow(spelling_errors) > 0) {
5555 " - remove it again manually from inst/WORDLIST to make sure it's not\n " ,
5656 " ignored in the future.\n " ,
5757 " Then, try committing again.\n " ,
58- " Hint: you can disable this behavior by providing a --no-update flag.\n "
58+ " Hint: you can disable this behavior by providing a --read-only flag.\n "
5959 )
6060 }
6161 stop(" Spell check failed" , call. = FALSE )
0 commit comments