Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: pre-commit
on:
push:
branches-ignore:
- 'master'
- 'main'
- "master"
- "main"
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

Expand Down
49 changes: 25 additions & 24 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
# R specific hooks: https://github.com/lorenzwalthert/precommit
default_stages: [commit]
default_language_version:
python: python3
python: python3

repos:
- repo: https://github.com/lorenzwalthert/precommit
- repo: https://github.com/lorenzwalthert/precommit
rev: v0.3.2.9003
hooks:
- id: style-files
args: ['--ignore-start="^# styler: off$"', '--ignore-stop="^# styler: on$"']
exclude: >
- id: style-files
args:
['--ignore-start="^# styler: off$"', '--ignore-stop="^# styler: on$"']
exclude: >
(?x)^(
tests/testthat/.*/.*\.R(md|nw)?|
vignettes/customizing_styler\.Rmd|
Expand All @@ -19,13 +20,13 @@ repos:
tests/testmanual/addins/.*invalid.*|
tests/testmanual/addins/r-valid\.R|
)$
- id: roxygenize
- id: roxygenize
additional_dependencies:
- r-lib/pkgapi
- dplyr@1.0.9
- roxygen2@7.2.1
- id: use-tidy-description
- id: spell-check
- r-lib/pkgapi
- dplyr@1.0.9
- roxygen2@7.2.1
- id: use-tidy-description
- id: spell-check
exclude: >
(?x)^(
\.github/.*\.yaml|
Expand All @@ -51,8 +52,8 @@ repos:
.*\.RData|
.*-in_tree
)$
- id: readme-rmd-rendered
- id: parsable-R
- id: readme-rmd-rendered
- id: parsable-R
exclude: >
(?x)^(
tests/testthat/public-api/xyzaddin/addin_region-.*|
Expand All @@ -65,7 +66,7 @@ repos:
tests/testthat/public-api/xyzfile_rmd/random4\.Rmd|
tests/testthat/rmd/no-tidy-(in|out)\.Rmd|
)$
- id: no-browser-statement
- id: no-browser-statement
exclude: >
(?x)^(
tests/testthat/public-api/xyzaddin/addin_region-.*|
Expand All @@ -76,7 +77,7 @@ repos:
tests/testthat/exception_handling/parser-error.R|
tests/testmanual/|
)$
- id: deps-in-desc
- id: deps-in-desc
exclude: >
(?x)^(
touchstone/.*|
Expand All @@ -85,14 +86,14 @@ repos:
tests/testthat/rnw/011-conditional-eval-out\.Rnw|
tests/testthat/.*\.R(md)?
)$
- repo: https://github.com/pre-commit/pre-commit-hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-added-large-files
args: ['--maxkb=200']
- id: file-contents-sorter
- id: check-added-large-files
args: ["--maxkb=200"]
- id: file-contents-sorter
files: "\\.Rbuildignore$"
- id: end-of-file-fixer
- id: end-of-file-fixer
exclude: >
(?x)^(
\.Rd|
Expand All @@ -101,13 +102,13 @@ repos:
tests/testthat/reference-objects/.*|
tests/testthat/_snaps/.*|
)$
- repo: https://github.com/lorenzwalthert/gitignore-tidy
- repo: https://github.com/lorenzwalthert/gitignore-tidy
rev: a2260df7cc08de00d7312aeff68cea6bcba48c42
hooks:
- id: tidy-gitignore
- repo: local
- id: tidy-gitignore
- repo: local
hooks:
- id: forbid-to-commit
- id: forbid-to-commit
name: Don't commit common R artifacts
entry: Cannot commit .Rhistory, .RData, .Rds or .rds.
language: fail
Expand Down