Repository navigation
Allow users to set lintr.linter_file - #338
Conversation
Codecov Report
@@ Coverage Diff @@
## master #338 +/- ##
=========================================
- Coverage 85.64% 85.6% -0.05%
=========================================
Files 41 41
Lines 2131 2132 +1
=========================================
Hits 1825 1825
- Misses 306 307 +1
Continue to review full report at Codecov.
|
|
I agree this needs to change, however I think the test needs to be something like if (is_absolute_path(linter_file) && file.exists(linter_file)) {
return(linter_file)
} |
|
Checking if the file exists makes sense, but doesn't it make sense for users to be able to use a relative path? It could be just as simple as saying |
|
Yes, you can already do that, but the code assumes the path is relative to the file being linted or the project rather than the working directory; which causes issues when the 3rd party plugins call lintr on a copy of the file in a temporary directory rather than the file itself. |
c11fdc1 to
db4b348
Compare
|
Ah, I forgot that. Probably should have more coffee :-) Changed, thanks |
|
Thanks! |
This lets users specify the location of the linter file with
options(lintr.linter_file) before calling lintr::lint(). This should
be useful to allow the various plugins to specify the path to the
.lintr file
Related to #123 and #335