jfmengels / elm-review-unused

Provides elm-review rules to detect unused elements in your Elm project
https://package.elm-lang.org/packages/jfmengels/elm-review-unused/latest/
BSD 3-Clause "New" or "Revised" License
23 stars 12 forks source link

Catch unused imported functions when shadowed in a tuple let declaration v2 #92

Closed jfmengels closed 7 months ago

jfmengels commented 7 months ago

Spun off from #91, the following report was discovered by @matzko

I noticed that if there is an unused imported function of the same name as a variable declared in a tuple, it doesn't get recognized as unused.

For example, a below:

module SomeModule exposing (b, bar)
import Foo exposing (a)

bar : Int
bar =
    let
        (a, c) = (1, 3)
    in
    a + c

@matzko I would appreciate your review (but no pressure), at least to see if this still correctly solves your original issue.