-
Notifications
You must be signed in to change notification settings - Fork 24
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
Check unused explicit imports, e.g. using ExplicitImports.jl
#268
Comments
Even though this is not a feature of Aqua, there already is a dedicated tool for exactly this: Check out https://github.com/ericphanson/ExplicitImports.jl |
I only skimmed the README of ExplicitImports and did not notice this feature. Thanks for pointing that out! I will use ExplicitImports then for my use case. Should such a test be added to Aqua? If not, feel free to close this issue. |
ExplicitImports.jl
I think this would make much sense to have Aqua as a one-stop solution. However, ExplicitImports requires Julia 1.7, not sure if this fits with the Aqua policy. May be they can make the test a no-op on earlier versions. |
FYI ExplicitImports.jl v1.5 has expanded scope a bit, and can detect some issues related to qualified names, like using All the testing-oriented checks it does are here: https://ericphanson.github.io/ExplicitImports.jl/stable/api/#Checks-to-use-in-testing. However, I don't think it would yet catch the case from the OP. If it were qualified like |
Just to say ExplicitImports v1.6 should now be able to handle the case from the OP via the new There’s a table of all the checks here: https://github.com/ericphanson/ExplicitImports.jl/tree/v1.6.0?tab=readme-ov-file#summary |
ExplicitImports.jl 1.7 now supports Julia 1.6, so if Aqua was willing to require 1.6 instead of 1.0, it would be addable. It is harder to support older Julias like 1.0 in ExplicitImports.jl since some of the tests involve newer syntax (on purpose, to make sure we are parsing tricky cases correctly) so they can't run on older Julia's. I had to make some tests conditional on 1.7+ and to support below 1.5 I would have to make even more tests not run on older Julia's, which at some point may compromise correctness there. |
What is the exact worth of supporting Julia 1.0? |
One of my packages broke because of
As of Julia 1.9,
repeat
is no longer available that way, and I didn't notice that it was in Base all along.While checking the other imported identifiers, I noticed some other candidates that didn't even need anymore.
It would be awesome if Aqua could detect those.
The text was updated successfully, but these errors were encountered: