Skip to content

Add deprecation note #341

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 7, 2021
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
7 changes: 7 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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).
Expand Down
6 changes: 6 additions & 0 deletions R/cache.R
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
8 changes: 5 additions & 3 deletions vignettes/available-hooks.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down Expand Up @@ -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}
Expand Down