Skip to content

Commit

Permalink
docs: mention --read-only for spell-check in vignettes
Browse files Browse the repository at this point in the history
  • Loading branch information
TymekDev committed Feb 8, 2024
1 parent 5339648 commit 4406ac2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions vignettes/available-hooks.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,14 @@ The `lang` arg will be passed to `spelling::spell_check_files()`.
id: spell-check
args: [--lang=<language>]

**read only**

The `--read-only` flag will be passed to spell check. This flag makes
this hook idempotent.

id: spell-check
args: [--read-only]

This hook does not modify input files. It will add all words not found
in the dictionary to `inst/WORDLIST`, assuming they were spelled
correctly but were not in the dictionary. An example might be "RStudio".
Expand All @@ -205,6 +213,8 @@ them and remove them from `inst/WORDLIST`. If there were not typos, or
you fixed all, stage `inst/WORDLIST` and this time, the commit should
pass.

To opt out of updating `inst/WORDLIST` provide the `--read-only` flag.

## `roxygenize`

A hook to run `roxygen2::roxygenize()`. Makes sure you commit your `.Rd`
Expand Down
2 changes: 1 addition & 1 deletion vignettes/hook-order.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Read only hooks should generally run only after write hooks.
- roxygenize - caches
- codemeta-description-updated - must be before use-tidy-description
- use-tidy-description
- spell-check - updates `inst/WORDLIST`; should run after roxygenize
- spell-check - updates `inst/WORDLIST` (unless `--read-only` arg is specified); should run after roxygenize

### Read only

Expand Down

0 comments on commit 4406ac2

Please sign in to comment.