ericphanson / ExplicitImports.jl

Developer tooling for Julia namespace management: detecting implicit imports, improper explicit imports, and improper qualified accesses
https://ericphanson.github.io/ExplicitImports.jl/
MIT License
62 stars 2 forks source link

False positive when unpacking loop variables #35

Closed fredrikekre closed 2 months ago

fredrikekre commented 2 months ago

Source:

module TestPackage

using LinearAlgebra

function foo(x)
    for (i, I) in pairs(x)
    end
end

end

Gives:

Module TestPackage is relying on implicit imports for 2 names. These could be explicitly imported as follows:

```julia
using LinearAlgebra: LinearAlgebra # used at /home/fredrik/dev/TestPackage/src/TestPackage.jl:3:7
using LinearAlgebra: I # used at /home/fredrik/dev/TestPackage/src/TestPackage.jl:6:13