Thank you for providing this package and the tools beneath. When using devtools::lint() to lint the source code of a local package without changing any defaults I got the following error:
.Error in gzfile(file, "wb") : cannot open the connection
In addition: Warning messages:
1: In dir.create(path) :
cannot create dir '/Users/axel/.R/lintr_cache', reason 'No such file or directory'
2: In gzfile(file, "wb") :
cannot open compressed file '/Users/axel/.R/lintr_cache/638da06b9726522683c05aa11150f6363bbfce89', probable reason 'No such file or directory'
This was confusing to me first as lintr::lint_package() succeeds (without changing any defaults). After checking my user directory and seeing that there is no .R directory i figured out that the difference between devtools::lint() and lintr::lint() is the default value of cache, which is TRUE in devtools and FALSE in lintr.
Therefore it might be a good idea (if the difference in defaults is intended) to check the existence of the .R directory before trying to use it for the cache and provide the user with a more meaningful cli-warning or even create it if it does not exist (creating the directory manually did solve the problem).
Let me know if I should provide any additional info or create a pull request to fix this (for which your advise on the intended behaviour would be needed).
Thank you for providing this package and the tools beneath. When using
devtools::lint()
to lint the source code of a local package without changing any defaults I got the following error:This was confusing to me first as
lintr::lint_package()
succeeds (without changing any defaults). After checking my user directory and seeing that there is no.R
directory i figured out that the difference betweendevtools::lint()
andlintr::lint()
is the default value ofcache
, which isTRUE
indevtools
andFALSE
inlintr
.Therefore it might be a good idea (if the difference in defaults is intended) to check the existence of the
.R
directory before trying to use it for the cache and provide the user with a more meaningful cli-warning or even create it if it does not exist (creating the directory manually did solve the problem).Let me know if I should provide any additional info or create a pull request to fix this (for which your advise on the intended behaviour would be needed).
Here is the output of
sessionInfo()
: