Skip to content

Commit

Permalink
Adds Sys.unsetenv() to default_undesirable_functions (#2192)
Browse files Browse the repository at this point in the history
* Adds `Sys.unsetenv()` to `default_undesirable_functions`

closes #1762

* Update NEWS.md
  • Loading branch information
IndrajeetPatil authored Sep 19, 2023
1 parent 8fe5e0f commit 1183f15
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
* `unused_import_linter()` gains an argument `interpret_glue` (default `TRUE`) paralleling that in `object_usage_linter()` to toggle whether `glue::glue()` expressions should be inspected for exported object usage (#2042, @MichaelChirico).
* `sort_linter()` only lints on `order()` of a single vector, excluding e.g. `x[order(x, y)]` and `x[order(y, x)]` (#2156, @MichaelChirico).
* `redundant_ifelse_linter()` is aware of `dplyr::if_else()`'s `missing=` argument, so that `if_else(A, TRUE, FALSE, missing = FALSE)` doesn't lint, but `if_else(A, TRUE, FALSE, NA)` does (#1941, @MichaelChirico). Note that `dplyr::coalesce()` or `tidyr::replace_na()` may still be preferable.
* `default_undesirable_functions` is updated to also include `Sys.unsetenv()` (#2192, @IndrajeetPatil).

### New linters

Expand Down
1 change: 1 addition & 0 deletions R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ default_undesirable_functions <- all_undesirable_functions[names(all_undesirable
"source",
"Sys.setenv",
"Sys.setlocale",
"Sys.unsetenv",
"trace",
"undebug",
"untrace"
Expand Down

0 comments on commit 1183f15

Please sign in to comment.