diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ae8bcde0..4e6b8b96 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,24 +1,43 @@ # All available hooks: https://pre-commit.com/hooks.html # R specific hooks: https://github.com/lorenzwalthert/precommit repos: -- repo: https://github.com/lorenzwalthert/precommit - rev: v0.2.2.9009 + - repo: https://github.com/lorenzwalthert/precommit + rev: v0.4.2 hooks: - # any R project - - id: style-files - args: [--style_pkg=styler, --style_fun=mlr_style] - - id: lintr - args: [--warn_only] - - id: parsable-R - - id: no-browser-statement - - id: readme-rmd-rendered - # R package development - # - id: roxygenize - #- id: use-tidy-description - - id: deps-in-desc - # - id: codemeta-description-updated -- repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.1.0 + - id: style-files + args: [--style_pkg=styler.mlr, --style_fun=mlr_style] + additional_dependencies: + - mlr-org/styler.mlr + - id: roxygenize + additional_dependencies: + - backports + - checkmate + - data.table + - digest + - paradox + - R6 + # codemeta must be above use-tidy-description when both are used + - id: use-tidy-description + - id: readme-rmd-rendered + - id: parsable-R + - id: no-browser-statement + - id: deps-in-desc + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.6.0 hooks: - - id: check-added-large-files - args: ['--maxkb=200'] + - id: check-added-large-files + args: [--maxkb=200] + - id: file-contents-sorter + files: '^\.Rbuildignore$' + - id: end-of-file-fixer + exclude: '\.Rd' + - repo: local + hooks: + - id: forbid-to-commit + name: Don't commit common R artifacts + entry: Cannot commit .Rhistory, .RData, .Rds or .rds. + language: fail + files: '\.Rhistory|\.RData|\.Rds|\.rds$' + # `exclude: ` to allow committing specific files. +ci: + autoupdate_schedule: monthly