From 426e63fe402e6492e0baf10441cf8ea3729d8ca6 Mon Sep 17 00:00:00 2001 From: Maximilian Muecke Date: Tue, 6 Feb 2024 11:32:47 +0100 Subject: [PATCH] chore: update precommit --- .pre-commit-config.yaml | 61 +++++++++++++++++++++++++++++------------ 1 file changed, 43 insertions(+), 18 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5ab490a4..bf0f7dc0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,22 +1,47 @@ # 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.1.2 + - repo: https://github.com/lorenzwalthert/precommit + rev: v0.4.0 hooks: - # any R project - - id: style-files - args: [--style_pkg=styler, --style_fun=mlr_style] # install with remotes::install_github("pat-s/styler@mlr-style") - # - id: lintr - - id: parsable-R - - id: no-browser-statement - - id: readme-rmd-rendered - # R package development - - id: roxygenize - - id: use-tidy-description - #- id: deps-in-desc - args: [--allow_private_imports] -- repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.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 + - clue + - fpc + - cluster + - data.table + - mlr3misc + - 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 + exclude: data-raw|inst + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.5.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