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

add script functionality #23

Closed ericphanson closed 3 months ago

ericphanson commented 3 months ago

closes https://github.com/ericphanson/ExplicitImports.jl/issues/19

julia> print_explicit_imports_script("script.jl")
Script `script.jl` is relying on implicit imports for 1 names. These could be explicitly imported as follows:

```julia
using LinearAlgebra: norm

Additionally, script script.jl has stale explicit imports for these unused names:

I think this should also include using LinearAlgebra: LinearAlgebra, but that doesn't work, since which(Main, :LinearAlgebra) === Main (whereas I think it should be `LinearAlgebra). I filed https://github.com/JuliaLang/julia/issues/53576 for that.

codecov-commenter commented 3 months ago

Codecov Report

Attention: Patch coverage is 86.66667% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 96.19%. Comparing base (fb39a47) to head (4af876f).

Files Patch % Lines
src/ExplicitImports.jl 86.66% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #23 +/- ## ========================================== - Coverage 96.49% 96.19% -0.31% ========================================== Files 5 5 Lines 514 525 +11 ========================================== + Hits 496 505 +9 - Misses 18 20 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.