Skip to content
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

Cache directory input not respected #213

Closed
fangly opened this issue Feb 28, 2017 · 1 comment
Closed

Cache directory input not respected #213

fangly opened this issue Feb 28, 2017 · 1 comment

Comments

@fangly
Copy link
Contributor

fangly commented Feb 28, 2017

Hi Jim,

I found a small issue in the lint() function, when specifying a cache directory. In the root directory of a package, consider:

setwd("tests/")
cacheDir <- file.path("..", ".lintr_cache")
lintr::expect_lint_free(cache=cacheDir)

This should create a directory ".lintr_cache", but it creates instead "~/.R/lintr_cache/".

After investigating, I found that in file "R/lint.R", function lint(), the line that reads:

save_cache(lint_cache, filename)

should be replaced by:

save_cache(lint_cache, filename, cache_dir)

Additionally, the documentation for the "cache" could be improved by stating that it is a directory (and not a simple file).

Cheers,
Florent

fangly added a commit to fangly/lintr that referenced this issue Mar 8, 2017
@fangly
Copy link
Contributor Author

fangly commented Mar 13, 2017

Fixed in #214

@fangly fangly closed this as completed Mar 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant