Skip to content

Commit 6087115

Browse files
add try-repo again
1 parent 3db44a2 commit 6087115

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

CONTRIBUTING.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@ Hooks should be tested by checking both the positive outcome (hook passes) and
2121
the negative outcome (hook fails) by adding two `run_test()` statements to
2222
[`./tests/testthat/test-hooks.R`](https://github.com/lorenzwalthert/precommit/blob/main/tests/testthat/test-hooks.R). Look at existing examples and [the documentation
2323
of `run_test()`](https://lorenzwalthert.github.io/precommit/reference/run_test.html). Note that this won't interact with pre-commit. It will simply
24-
run `Rscript path/to/script.R` (whereas with pre-commit, a {renv} will be activated before running the script). Also, there are [tests](https://github.com/lorenzwalthert/precommit/blob/main/.github/workflows/end-to-end.yml) to ensure that hooks are correctly registered in `.pre-commit-hooks.yaml`.
24+
run `Rscript path/to/script.R` (whereas with pre-commit, a {renv} will be activated before running the script).
25+
26+
Also, there are [tests](https://github.com/lorenzwalthert/precommit/blob/main/.github/workflows/end-to-end.yml) to ensure that hooks are correctly registered in `.pre-commit-hooks.yaml`, which you have to adapt if you add a hook.
27+
28+
You can also test them with `pre-commit try-repo` as described in the [documentation](https://pre-commit.com/#pre-commit-try-repo).
29+
2530

2631
# Summary
2732

0 commit comments

Comments
 (0)