diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f5e30715d..c1fb58099 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ # R specific hooks: https://github.com/lorenzwalthert/precommit repos: - repo: https://github.com/lorenzwalthert/precommit - rev: v0.4.3.9003 + rev: 111b95a44750a710337f71d3886832b95b327774 hooks: - id: style-files args: [--style_pkg=styler, --style_fun=tidyverse_style, --cache-root=styler-perm] @@ -31,34 +31,34 @@ repos: - id: spell-check exclude: > (?x)^( + (.*/|)NAMESPACE| + (.*/|)WORDLIST| + (.*/|)\.Rbuildignore| + (.*/|)\.Renviron| + (.*/|)\.Rprofile| + (.*/|)\.gitignore| + (.*/|)\.pre-commit-.*| + (.*/|)\.travis\.yml| + (.*/|)appveyor\.yml| + (.*/|)renv/settings\.dcf| + (.*/|)renv\.lock| + .*\.RData| + .*\.Rds| + .*\.Rproj| .*\.[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| + LICENSE| \.github/workflows/.*| data/.*| inst/hooks/.*| inst/pre-commit-.*| inst/usethis-legacy-hook| - LICENSE| renv/.*| revdep/.*| tests/testthat/in/.*| diff --git a/R/roxygen2.R b/R/roxygen2.R index b31244f80..0b58d3ef1 100644 --- a/R/roxygen2.R +++ b/R/roxygen2.R @@ -85,8 +85,8 @@ roxygenize_with_cache <- function(key, dirs) { error = function(e) e ) if ( - inherits(out, "packageNotFoundError") || - ("message" %in% names(out) && grepl("Dependency package(\\(s\\))? .* not available", out$message)) + inherits(out, c("packageNotFoundError", "rlib_error_package_not_found")) || + ("message" %in% names(out) && grepl("The package .* is required\\.", conditionMessage(out))) ) { rlang::abort(paste0( conditionMessage(out), @@ -97,7 +97,7 @@ roxygenize_with_cache <- function(key, dirs) { " - id: roxygenize", " additional_dependencies: - - r-lib/pkgapi\n\n" + - r-lib/pkgapi # replace `r-lib/pkgapi` with the package required\n\n" )) } else if (inherits(out, "error")) { rlang::abort(conditionMessage(out)) diff --git a/precommit.Rproj b/precommit.Rproj index 9f964990f..c5cae4bb7 100644 --- a/precommit.Rproj +++ b/precommit.Rproj @@ -1,4 +1,5 @@ Version: 1.0 +ProjectId: 3e63e6ad-9f4f-48c7-9a5f-2cbad1d4915d RestoreWorkspace: Default SaveWorkspace: Default