Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Running 'git' Pre-Commit Hooks

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
NotificationsYou must be signed in to change notification settings

alexym1/captain

CRAN_Status_BadgeR-CMD-checkCodecov test coverage

Running R pre-commit hooks

Overview

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.

Installation

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")

Usage

Initialize pre-commit framework

captain::install_precommit()

Run hooks

captain::run_precommit()

Add hooks

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

Code of conduct

Please note that this project is released with aContributor Code ofConduct. Byparticipating in this project you agree to abide by its terms.

Acknowledgments

This logo was created by@obstacle.graphic.

About

Running 'git' Pre-Commit Hooks

Topics

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Code of conduct

Contributing

Stars

Watchers

Forks

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp