Pre-Commit Hooks
Overview
Useful git hooks for R building on top of the multi-language framework 'pre-commit' for hook management. This package provides git hooks for common tasks like formatting files with 'styler' or spell checking as well as wrapper functions to access the 'pre-commit' executable.
- Drop legacy hook tests (#578).
- Extend pkgdown hook tests for latest release where URLs are checked too (#577).
- Fix test to pass with new pkgdown error message (#564).
- fix path resolution for conda (#564).
- Lint .qmd docs also (#570).
- Update hook dependencies (#581).
Thanks to all who contributed to this release: @boxydog, @hadley, @IndrajeetPatil, @jcken95, @jeancochrane, @jrdnbradford, @lorenzwalthert, @owenjonesuob, and @TymekDev.
From NEWS.md in the release
Install
Health
NOTECRAN incoming feasibilityr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc
Maintainer: ‘Lorenz Walthert <lorenz.walthert@icloud.com>’
No Authors@R field in DESCRIPTION.
Please add one, modifying
Authors@R: person(given = "Lorenz",
family = "Walthert",
role = c("aut", "cre"),
email = "lorenz.walthert@icloud.com")
as necessary.- NOTE11 OK, 2 NOTE2026-06-09
- ERROR11 OK, 1 NOTE, 1 ERROR2026-06-07
- NOTE12 OK, 2 NOTE2026-03-10
Documentation
- Help pages
- 48 (37 internal)includes a package overview page
- Examples that run
- 0%8 never run
- Exported functions with examples
- 44%
- Documented parameters
- 98%
- Return-value docs
- 50%
- Help pages citing references
- 0%
- precommit HTML
- available-hooks HTML
- Continuous Integration HTML
- FAQ HTML
- hook-order HTML
- testing HTML
- why-use-hooks HTML
Downloads
Repository
- PRs merged (all time)
- 85%
- Median days to close, 50 most recently updated closed issues
- 35
- Median days to close, 50 most recently updated closed PRs
- 8
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Commits over time
Commit identities over time
15 development-tooling and community-health practices detected across 7 families in the upstream repository
Checks run against github.com/lorenzwalthert/precommit on 2026-10-18.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
Funding links: GitHub Sponsors
The repository owner accepts GitHub Sponsors
GitHub Pages site last deployed 2026-10-17 · The repository has a site deploy workflow
pkgdown site last built 2024-07-23
Show all practicesHide 3 practices
Dependencies
Installing precommit adds 17 packages (9 with compiled code, 5.8 MB of source tarballs). Heaviest: fs 1.4 MB, vctrs 1.0 MB, rlang 766 KB.
Code & Tests
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- unarchivedReturned to CRAN2024-07-23
- 0.4.3Latest
- archivedRemoved from CRAN2024-07-21issues were not corrected in time
- RR 4.4.0 released · 2024-04-24
- 0.4.22024-04-10 · diff ↗
- 0.4.12024-03-31 · diff ↗
- 0.4.0
- RR 4.3.0 released · 2023-04-21
- 0.3.22022-07-01 · diff ↗
- 0.3.12022-06-15 · diff ↗
- 0.3.0
- RR 4.2.0 released · 2022-04-22
- 0.2.22021-12-15 · diff ↗
- 0.2.12021-12-14 · diff ↗
Show 5 earlier eventsHide 5 earlier events
- 0.2.02021-12-01 · diff ↗ ·
added 8 exports
dirs_R.cache, may_require_permanent_cache, roxygen_assert_additional_dependencies, roxygenize_with_cache, snippet_generate, update_precommit, use_ci, version_precommit - RR 4.1.0 released · 2021-05-18
- 0.1.32020-10-10 · diff ↗
- 0.1.22020-06-13
- RR 4.0.0 released · 2020-04-24
Package metadata
- First published
- 2020-06-13
- Total releases
- 12 / 6 yrs
- License
- GPL-3 OSI
- Download size
- 318 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("precommit")Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-21, which the citation names so these numbers can be found later. More on citing and the projects behind them.