diff --git a/NEWS.md b/NEWS.md index fb3000cf9..af1798f6c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,12 @@ # precommit v0.2.0.9000 (Development version) +**API Changes** + + +* The argument `--no-warn-cache` in the `style-files` and the `roxygenize` hook + is deprecated and will be removed in a future release. Please remove it from + your `.pre-commit-config.yaml` (#340. #341). + * `style-files` hook fails more informatively if required package is not listed in `additional_dependencies:` (#333). * configure all git operations to use LF (#337). diff --git a/R/cache.R b/R/cache.R index 1b36c7b12..556d77270 100644 --- a/R/cache.R +++ b/R/cache.R @@ -9,5 +9,11 @@ #' @family hook script helpers #' @export may_require_permanent_cache <- function(temp_cache_is_enough = FALSE) { + if (temp_cache_is_enough) { + rlang::warn(paste0( + "The argument `--no-warn-cache` is deprecated and will be removed in a ", + "future release. Please remove it from your `.pre-commit-config.yaml`." + )) + } return() } diff --git a/vignettes/available-hooks.Rmd b/vignettes/available-hooks.Rmd index e2d6a0594..94f1a962b 100644 --- a/vignettes/available-hooks.Rmd +++ b/vignettes/available-hooks.Rmd @@ -83,7 +83,8 @@ In addition, the hook takes the following arguments that are not passed to args: [--style_pkg=pkg.with.style.guide, --style_fun=exported.style.function] ``` -* The argument `--no-warn-cache` is ignored but allowed for compatibility. +* The argument `--no-warn-cache` is deprecated and will be removed in a future + release. Please remove it from your `.pre-commit-config.yaml`. * Argument `cache-root` is passed to `options()` to set `styler.cache_root`. @@ -171,8 +172,9 @@ should pass. A hook to run `roxygen2::roxygenize()`. Makes sure you commit your `.Rd` changes with the source changes. To take advantage of caching, you don't need to run -`roxygen2::roxygenize()` manually anymore. The option `--no-warn-cache` is -ignored but allowed for compatibility. +`roxygen2::roxygenize()` manually anymore. The argument `--no-warn-cache` is +deprecated and will be removed in a future release. Please remove it from your +`.pre-commit-config.yaml`. Because the hook will write the version of {roxygen2} to `DESCRIPTON`, you should either make sure the version you use when you call {roxygen2}