Skip to content

Commit 3253098

Browse files
use newer precommit file
1 parent 9792a83 commit 3253098

File tree

1 file changed

+37
-6
lines changed

1 file changed

+37
-6
lines changed

.pre-commit-config.yaml

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,51 @@
22
# R specific hooks: https://github.com/lorenzwalthert/precommit
33
repos:
44
- repo: https://github.com/lorenzwalthert/precommit
5-
rev: v0.0.0.9040
5+
rev: v0.1.0
66
hooks:
7-
- id: parsable-R
8-
- id: no-browser-statement
9-
# - id: lintr
10-
- id: readme-rmd-rendered
11-
- id: spell-check
127
- id: style-files
138
args: [--style_pkg=styler, --style_fun=tidyverse_style]
149
exclude: 'tests/testthat/.*/*\.R'
10+
- id: roxygenize
11+
- id: use-tidy-description
12+
- id: spell-check
13+
exclude: >
14+
(?x)^(
15+
data/.*|
16+
(.*/|)\.Rprofile|
17+
(.*/|)\.Renviron|
18+
(.*/|)\.gitignore|
19+
(.*/|)NAMESPACE|
20+
(.*/|)WORDLIST|
21+
(.*/|)\.travis.yml|
22+
(.*/|)appveyor.yml|
23+
(.*/|)\.Rbuildignore|
24+
(.*/|)\.pre-commit-.*|
25+
.*\.[rR]|
26+
.*\.Rproj|
27+
.*\.py|
28+
.*\.feather|
29+
.*\.rds|
30+
.*\.Rds|
31+
.*\.sh|
32+
.*\.RData
33+
)$
34+
- id: readme-rmd-rendered
35+
- id: parsable-R
36+
- id: no-browser-statement
37+
- id: deps-in-desc
1538
- repo: https://github.com/pre-commit/pre-commit-hooks
1639
rev: v2.5.0
1740
hooks:
1841
- id: check-added-large-files
1942
args: ['--maxkb=200']
2043
- id: end-of-file-fixer
2144
exclude: '\.Rd'
45+
- repo: local
46+
hooks:
47+
- id: forbid-to-commit
48+
name: Don't commit common R artifacts
49+
entry: Cannot commit .Rhistory, .RData, .Rds or .rds.
50+
language: fail
51+
files: '\.Rhistory|\.RData|\.Rds|\.rds$'
52+
# `exclude: <regex>` to allow committing specific files.

0 commit comments

Comments
 (0)