Skip to content

Commit 4406ac2

Browse files
committed
docs: mention --read-only for spell-check in vignettes
1 parent 5339648 commit 4406ac2

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

vignettes/available-hooks.Rmd

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,14 @@ The `lang` arg will be passed to `spelling::spell_check_files()`.
196196
id: spell-check
197197
args: [--lang=<language>]
198198

199+
**read only**
200+
201+
The `--read-only` flag will be passed to spell check. This flag makes
202+
this hook idempotent.
203+
204+
id: spell-check
205+
args: [--read-only]
206+
199207
This hook does not modify input files. It will add all words not found
200208
in the dictionary to `inst/WORDLIST`, assuming they were spelled
201209
correctly but were not in the dictionary. An example might be "RStudio".
@@ -205,6 +213,8 @@ them and remove them from `inst/WORDLIST`. If there were not typos, or
205213
you fixed all, stage `inst/WORDLIST` and this time, the commit should
206214
pass.
207215

216+
To opt out of updating `inst/WORDLIST` provide the `--read-only` flag.
217+
208218
## `roxygenize`
209219

210220
A hook to run `roxygen2::roxygenize()`. Makes sure you commit your `.Rd`

vignettes/hook-order.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Read only hooks should generally run only after write hooks.
2929
- roxygenize - caches
3030
- codemeta-description-updated - must be before use-tidy-description
3131
- use-tidy-description
32-
- spell-check - updates `inst/WORDLIST`; should run after roxygenize
32+
- spell-check - updates `inst/WORDLIST` (unless `--read-only` arg is specified); should run after roxygenize
3333

3434
### Read only
3535

0 commit comments

Comments
 (0)