- Notifications
You must be signed in to change notification settings - Fork0
Running 'git' Pre-Commit Hooks
License
Unknown, MIT licenses found
Licenses found
alexym1/captain
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Running R pre-commit hooks
Pre-commit hooks are scripts that run automatically before a commit isfinalized in Git. They’re used to catch issues early by enforcing checkslike code formatting, linting, or running tests before changes arecommitted.
captain (hook) is a package that allows you to run git pre-commithooks in a R environment.
Thecaptain package can be installed from CRAN as follows:
install.packages("captain")The latest version can be installed from GitHub as follows:
# install.packages("pak")pak::pak("alexym1/captain")
captain::install_precommit()
captain::run_precommit()
Editing the.pre-commit-config file usingcaptain::edit_precommit_config():
repos: - repo:local hooks: - id: renv name: Synchronize project from renv.lock description: Synchronize the project from the renv.lock entry: Rscript inst/pre-commit/hooks/synchronize_project.R language: system pass_filenames:false
Please note that this project is released with aContributor Code ofConduct. Byparticipating in this project you agree to abide by its terms.
This logo was created by@obstacle.graphic.
About
Running 'git' Pre-Commit Hooks
Topics
Resources
License
Unknown, MIT licenses found
Licenses found
Code of conduct
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.
