{"repo":"lorenzwalthert/precommit","free":true,"listed":false,"github":"https://github.com/lorenzwalthert/precommit","clone":"git clone https://github.com/lorenzwalthert/precommit.git","description":"pre-commit hooks for R projects","language":"R","stars":276,"topics":["pre-commit","hooks","git","vcs","workflow"],"license":"GPL-3.0","category":"workflow-automation","readme_excerpt":"--- editor options: markdown: wrap: 72 --- Useful git pre-commit hooks for R Pre-commit hooks are tests that run each time you attempt to commit. If the tests pass, the commit will be made, otherwise not. A very basic test is to check if the code is parsable, making sure you have not forgotten a comma, brace or quote. You can run hooks locally and/or in the cloud: - As a check before local commits: This requires installing pre-commit. - As a CI check with : If you want to enforce passing hooks on pull requests (and auto-fix trivial problems like styling) even if the committer does not have a local installation. Goals of the package The goal of this package is to twofold: - Provide a set of hooks that are useful when your git repo contains R code. - Provide usethis-like functionality for common tasks such as installation and set-up and config file modification. Why do I need pre-commit hooks? By Mara Averick For a more in-depth explanation and even more reasons, see vignette(\"why-use-hooks\") . Documentation The following online docs are available: - latest CRAN release. - GitHub development version. - UseR 2022 talk on pre-commit for R These only cover the functionality added on top of the pre-commit framework by this package. Everything else is covered in the extensive online documentation of the pre-commit framework itself, including how to create hooks for actions like git push or git checkout , create local hooks etc.","default_branch":null,"files":null,"tree":[],"storefront":"/r/lorenzwalthert","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/lorenzwalthert/precommit/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}