Code Monkey home page Code Monkey logo

precommit's Introduction

editor_options
markdown
wrap
72

Useful git pre-commit hooks for R

CRAN status Lifecycle: stable R build status

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 https://pre-commit.ci: 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:

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.

precommit's People

Contributors

lorenzwalthert avatar pre-commit-ci[bot] avatar kcphila avatar michaelquinn32 avatar maelle avatar krzyslom avatar lukashaenjes avatar jonmcalder avatar dependabot[bot] avatar pwildenhain avatar mpadge avatar bfgray3 avatar tymekdev avatar bart1 avatar tnonet avatar stefanoborini avatar pat-s avatar alessap avatar indrajeetpatil avatar gravesti avatar adamblake avatar asottile avatar jsnel avatar katrinleinweber avatar maurolepore avatar m-muecke avatar denn173 avatar jonathanckt avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.