Skip to content

Commit e148e5d

Browse files
committed
📝 Update CONTRIBUTING.md
1 parent 4a636ee commit e148e5d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

CONTRIBUTING.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pre-commit (https://github.com/pre-commit/pre-commit/issues/926), most hooks use
2121

2222
Hooks should be tested by checking both the positive outcome (hook passes) and
2323
the negative outcome (hook fails) by adding two `run_test()` statements to
24-
[`./tests/testthat/test-all.R`](https://github.com/lorenzwalthert/precommit/blob/main/tests/testthat/test-all.R). Look at existing examples and [the documentation
24+
[`./tests/testthat/test-hooks.R`](https://github.com/lorenzwalthert/precommit/blob/main/tests/testthat/test-hooks.R). Look at existing examples and [the documentation
2525
of `run_test()`](https://lorenzwalthert.github.io/precommit/reference/run_test.html). Note that this won't actually use pre-commit. It will simply
2626
call the hook script the same way as pre-commit would, with the difference that
2727
the test uses a path to the `Rscript` executable whereas with pre-commit, the
@@ -35,12 +35,11 @@ For this reason, always test the hook manually end-to-end with
3535

3636
# Summary
3737

38-
- add your script to in `inst/bin` and make it executable. Only R scripts are
39-
currently supported as testing is done with `Rscript ...`.
38+
- add your script in `inst/hooks/exported` and make it executable. Only R scripts are currently supported as testing is done with `Rscript ...`. See other scripts in `inst/hooks/exported` for a starting point for setting up your script.
4039

4140
- register hook in `.pre-commit-hooks.yaml`.
4241

4342
- add two unit tests, test manually with `pre-commit try-repo`.
4443

45-
- add a description of the new hook to the `README.Rmd`. Both description and
44+
- add a description of the new hook to `vignettes/available-hooks.Rmd`. Both description and
4645
`yaml` example code.

0 commit comments

Comments
 (0)