Skip to content

Commit

Permalink
Add pre-commit hooks to package
Browse files Browse the repository at this point in the history
  • Loading branch information
ldavies99 committed Jan 24, 2024
1 parent e41d7da commit dd4c7fe
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# See more hooks: https://github.com/lorenzwalthert/precommit
repos:
- repo: https://github.com/lorenzwalthert/precommit
rev: v0.1.3
hooks:
- id: style-files
name: Style files using styler
args: [ --style_pkg=styler, --style_fun=tidyverse_style ]
- id: roxygenize
name: Run roxygen2::roxygenize()
# codemeta must be above use-tidy-description when both are used
# - id: codemeta-description-updated
- id: use-tidy-description
name: Run sethis::use_tidy_description()
- id: lintr
name: Run lintr::lint()
exclude: renv/activate.R
- id: readme-rmd-rendered
name: Check README.Rmd has been rendered to README.md
- id: parsable-R
name: Check for valid R code using the parse() function
- id: no-browser-statement
name: Check for accidential browser() statements

0 comments on commit dd4c7fe

Please sign in to comment.