Repository navigation
Unused import linter - #239
Conversation
Codecov Report
@@ Coverage Diff @@
## master #239 +/- ##
=========================================
- Coverage 85.91% 84.4% -1.52%
=========================================
Files 39 40 +1
Lines 2179 2218 +39
=========================================
Hits 1872 1872
- Misses 307 346 +39
Continue to review full report at Codecov.
|
|
This looks quite useful. Should we try to get it up to speed and add tests? If so, for packages we should check for functions not used but imported in |
|
Yeah, I think that is right. |
fd3154a to
a26a12f
Compare
|
Rebased onto current HEAD as a first step. |
|
@jimhester I think we have a problem for packages: WDYT about keeping it restricted to |
|
yeah that is true, we would have to scan for all source in the package. |
|
NB: |
|
@MichaelChirico PTAL I've updated this PR and rebased onto current master. |
# Conflicts: # man/linters.Rd
|
What about packages that are used to load methods? I can't think of any example off-hand, but I'm imagining |
|
That's exactly why the |
|
#1090 should fix the build issue. |
# Conflicts: # man/linters.Rd
|
Ready for another round of review. |
MichaelChirico
left a comment
There was a problem hiding this comment.
Remind me why data.table is excluded? maybe a simple example of a script that needs library(data.table) but doesn't include any data.table exports. Can't think of one right now.
|
Looks like my added test isn't caught, please check the test is right & adjust the |
It's about the |
|
that doesn't trigger a lint though: |
Because it's a default? |
|
OK, nvm. understood. Technically, that example is not the best because users should be running Maybe |
|
Well we actually have this in internal ETL code where we know for sure the RDS contains a data.table because it's written by an adjacent file. The goal of |
IINM without Anyway, besides the point of this PR, and I'm OK with the default exceptions list. Last thing to fix is the added test for |
good to know that readRDS can mess things up - we mostly use feather locally, getting the data tables using |
This still needs some more testing, and tests written, but works with limited inputs.