From dce97d7fbc7e926635ae7618ba634839b8d73b0b Mon Sep 17 00:00:00 2001 From: Bernie Gray Date: Sat, 2 Nov 2019 21:42:31 -0400 Subject: [PATCH] add .pre-commit-config.yaml; closes #39 --- .Rbuildignore | 3 ++- .pre-commit-config.yaml | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 .pre-commit-config.yaml diff --git a/.Rbuildignore b/.Rbuildignore index fb146f9..2d2e5ed 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -1,5 +1,5 @@ ^\.lintr$ -^.*\.Rproj$ +^cattonum\.Rproj$ ^\.Rproj\.user$ ^\.travis\.yml$ .Rprofile @@ -11,3 +11,4 @@ ^LICENSE\.md$ ^revdep$ ^\.github$ +^\.pre-commit-config.yaml$ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..f562205 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,20 @@ +repos: + # TODO: make sure no tabs or CRLF +- repo: https://github.com/lorenzwalthert/precommit + rev: v0.0.0.9016 + hooks: + - id: no-browser-statement + - id: parsable-R + - id: readme-rmd-rendered + - id: style-files +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v2.4.0 + hooks: + - id: check-added-large-files + - id: check-merge-conflict + - id: check-yaml + - id: end-of-file-fixer + - id: detect-private-key + - id: no-commit-to-branch + - id: trailing-whitespace + args: [--markdown-linebreak-ext=md]