• Stars
    star
    242
  • Rank 167,048 (Top 4 %)
  • Language
    R
  • License
    GNU General Publi...
  • Created over 5 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

pre-commit hooks for R projects

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.

More Repositories

1

touchstone

Smart benchmarking of pull requests with statistical confidence
R
53
star
2

gitsum

parse and summarise git repository history
R
46
star
3

strcode

Structure your code better.
R
43
star
4

stylermd

Make markdown or plain text fit 80 characters. Or any limit you want.
R
23
star
5

parsesum

Analyse R source code through parsing
R
16
star
6

w-c4ds

R
12
star
7

namespaces

inspecting CRAN NAMESPACE files and find first-time exports for minimal version dependency
R
7
star
8

gitignore-tidy

Re-order and clean .gitignore files
Python
7
star
9

oneliner

Put all your code on one line. Automatically.
R
6
star
10

styler.yours

A template repository for creating third-party style guides for {styler}
R
5
star
11

simplificar

A high-level API for ggplot2
R
4
star
12

saamwerk

Resources to collaborate on open-source projects
CSS
4
star
13

KerasMisc

Add-on functionality for the R implementation of Keras
R
3
star
14

teamtools

Tools for organising meta data with a focus on team/project/repo directory structure
R
3
star
15

useR2022.precommit.demo

R
2
star
16

bonousu

A guide of good practice for R programming
2
star
17

fallback

Value resolution with config files
R
2
star
18

vscode-config

My vscode settings, non-standard keybindings snippets etc.
2
star
19

drogger

A logging scheme extending futile.logger
R
1
star
20

ecr

Enhanced crash resilience for vacuum cleaners
1
star
21

localCran

R
1
star
22

semicoloner

Third-party style guide for {styler}: Put a semi-colon after every expression
R
1
star
23

prettynumbers

Pretty-print vectors with (large) numbers
R
1
star
24

thesis-template-bookdown

Bookdown template for Master Thesis at Seminar for Statistics, ETH Zurich
TeX
1
star
25

styler_precommit

Python
1
star