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 with struct member name that shadows imported name #36

Closed fredrikekre closed 2 months ago

fredrikekre commented 2 months ago

Source:

module TestPackage

using LinearAlgebra

struct Foo
    qr::Int
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: qr # used at /home/fredrik/dev/TestPackage/src/TestPackage.jl:6:5
fredrikekre commented 2 months ago

Thanks for the quick fixes!