forked from lorenzwalthert/precommit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-hooks.yaml
122 lines (122 loc) · 4.07 KB
/
.pre-commit-hooks.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
- id: roxygenize
name: roxygenize
description: run `roxygen2::roxygenize()`
entry: Rscript inst/hooks/exported/roxygenize.R
language: r
files: '^(R|man)/'
require_serial: true
minimum_pre_commit_version: "2.13.0"
- id: use-tidy-description
name: use-tidy-description
description: run `usethis::use_tidy_description()`
entry: Rscript inst/hooks/exported/use-tidy-description.R
language: r
files: '^DESCRIPTION$'
minimum_pre_commit_version: "2.13.0"
- id: style-files
name: style-files
description: style files with {styler}
entry: Rscript inst/hooks/exported/style-files.R
language: r
files: '(\.[rR]profile|\.[rR]|\.[rR]md|\.[rR]nw|\.[qQ]md)$'
exclude: 'renv/activate\.R'
minimum_pre_commit_version: "2.13.0"
- id: no-browser-statement
name: no-browser-statement
description: check if a .R file contains a `browser()` statement
entry: Rscript inst/hooks/exported/no-browser-statement.R
language: r
files: '\.[rR]$'
minimum_pre_commit_version: "2.13.0"
- id: no-print-statement
name: no-print-statement
description: check if a .R file contains a `print()` statement
entry: Rscript inst/hooks/exported/no-print-statement.R
language: r
files: '\.[rR]$'
minimum_pre_commit_version: "2.13.0"
- id: no-debug-statement
name: no-debug-statement
description: check if a .R file contains a `debug()` or `debugonce()` statement
entry: Rscript inst/hooks/exported/no-debug-statement.R
language: r
files: '\.[rR]$'
minimum_pre_commit_version: "2.13.0"
- id: parsable-R
name: parsable-R
description: check if a .R file is parsable
entry: Rscript inst/hooks/exported/parsable-R.R
language: r
files: '\.[rR](md)?$'
minimum_pre_commit_version: "2.13.0"
- id: readme-rmd-rendered
name: readme-rmd-rendered
description: make sure README.Rmd hasn't been edited more recently than `README.md`
entry: Rscript inst/hooks/exported/readme-rmd-rendered.R
language: r
files: 'README\.[Rr]?md$'
minimum_pre_commit_version: "2.13.0"
- id: codemeta-description-updated
name: codemeta-description-updated
description: make sure `codemeta.json` is in sync with `DESCRIPTION`. It should be run after use-tidy-description
entry: Rscript inst/hooks/exported/codemeta-description-updated.R
language: r
files: '^DESCRIPTION$'
minimum_pre_commit_version: "2.13.0"
- id: spell-check
name: spell-check
description: perform a spell check with `spelling::spell_check_files()`
entry: Rscript inst/hooks/exported/spell-check.R
language: r
exclude: >
(?x)^(
.*\.[rR]|
.*\.feather|
.*\.jpeg|
.*\.pdf|
.*\.png|
.*\.py|
.*\.RData|
.*\.rds|
.*\.Rds|
.*\.Rproj|
.*\.sh|
(.*/|)\.gitignore|
(.*/|)\.pre-commit-.*|
(.*/|)\.Rbuildignore|
(.*/|)\.Renviron|
(.*/|)\.Rprofile|
(.*/|)\.travis\.yml|
(.*/|)appveyor\.yml|
(.*/|)NAMESPACE|
(.*/|)renv/settings\.dcf|
(.*/|)renv\.lock|
(.*/|)WORDLIST|
\.github/workflows/.*|
data/.*|
)$
require_serial: true
minimum_pre_commit_version: "2.13.0"
- id: deps-in-desc
name: deps-in-desc
description: Check if dependencies that can be parsed from code are in `DESCRIPTION`
entry: Rscript inst/hooks/exported/deps-in-desc.R
language: r
files: '(\.[rR]profile|\.R|\.Rmd|\.Rnw|\.r|\.rmd|\.rnw)$'
exclude: 'renv/activate\.R'
minimum_pre_commit_version: "2.13.0"
- id: lintr
name: lintr
description: check if a `.R` file is lint free (using {lintr})
entry: Rscript inst/hooks/exported/lintr.R
language: r
files: '(\.[rR]profile|\.R|\.Rmd|\.Rnw|\.r|\.rmd|\.rnw)$'
exclude: 'renv/activate\.R'
minimum_pre_commit_version: "2.13.0"
- id: pkgdown
name: pkgdown
description: check if your {pkgdown} config file has the correct entries for references and articles
entry: inst/hooks/exported/pkgdown.R
language: script
minimum_pre_commit_version: "2.13.0"
files: '^man/|_pkgdown\.yml'