tooltitude / support

Tooltitude Support
https://www.tooltitude.com
Other
21 stars 0 forks source link

Incorrect detect `Unused Import` error #36

Closed d-enk closed 7 months ago

d-enk commented 7 months ago

Tooltitude Version: v0.66.3

OS Version: Ubuntu 6.5.0-25.25~22.04.1-generic 6.5.13

VS Code Version: 1.87.2

Go Version: 1.22.1


package test

import (
    "context" // Unused Import

    . "github.com/smartystreets/goconvey/convey"
)

func init() {
    _ = So
    _ = context.Background
}
//go.mod
module test

go 1.22.1

require github.com/smartystreets/goconvey v1.8.1

require (
    github.com/gopherjs/gopherjs v1.17.2 // indirect
    github.com/jtolds/gls v4.20.0+incompatible // indirect
    github.com/smarty/assertions v1.15.0 // indirect
)
tooltitude-support commented 7 months ago

Thanks for your feedback. It seems that it's an obvious bug. It shouldn't take a lot of time to fix, so I guess, it will be out in 0.67.0 which will likely be out tomorrow (or may be even today later).

tooltitude-support commented 7 months ago

@d-enk I looked into it. It looks like "github.com/smartystreets/goconvey/convey" has a type named context, which might lead to context be wrongly resolved to. Could you enable broken references, and see whether Background is considered broken?

tooltitude-support commented 7 months ago

Reproduced it on a toy example (no need to check it):

Screenshot 2024-03-21 at 11 21 25 AM

P.S. It would be great if you keep unresolved references turned on. It helps a lot with finding and fixing bugs, and the situation improved a lot since with the time. We fixed a lot of issues.

tooltitude-support commented 7 months ago

Ok. Fixed the problem. It will be out in 0.67.0 as I said.

tooltitude-support commented 7 months ago

0.67.0 is out. Closing this issue.

Please, check that it works there.

tooltitude-support commented 7 months ago

And again, thanks a lot for reporting bugs. Don't hesitate to report bug and ask for features in the future! We are really eager to fix bugs and implement new features (where it's reasonable).