Skip to content

Commit

Permalink
Ensure we don't leave behind cache files after running tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jimhester committed Oct 11, 2022
1 parent d014b4b commit f904ff8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: lintr
Title: A 'Linter' for R Code
Version: 3.0.1
Version: 3.0.2
Authors@R: c(
person("Jim", "Hester", , "[email protected]", role = c("aut", "cre")),
person("Florent", "Angly", role = "aut",
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# lintr 3.0.2

* Fix test to avoid leaving behind cache files in the global cache directory.

# lintr 3.0.1

* Skip multi-byte tests in non UTF-8 locales (#1504)
Expand Down
4 changes: 4 additions & 0 deletions tests/testthat/test-cache.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ fixtures$retrieve_lint <- function() {
)
}

# Run tests with a temporary cache directory, so we don't leave files behind
# after running
withr::local_options(lintr.cache_directory = withr::local_tempdir())

# Helper functions

fhash <- function(filename) {
Expand Down

0 comments on commit f904ff8

Please sign in to comment.