-
Couldn't load subscription status.
- Fork 2
Open
Description
Firstly, great plugin!
I was actually considering making a plugin myself to make it easier to deal with go's duck-typed interfaces when I found yours while researching :)
Yours is close to what I was looking for, but here's what I was initially hoping to have:
I want to use go's built in documentation links (square brackets in comments [], which are already parsed/highlighted in the golang VSCode extension so must be already understood by the plugin) to check/enforce implementation of interfaces.
EG:
// MyType implements [MyInterface] (see #1 below)
type MyType struct {}
type MyInterface interface {
Foo()
}
// MyType implements [MyInterface] (see #2 below)
func (m *MyType) Foo() {...}In this scenario, the plugin would:
- throw an error (in the VScode errors panel) when a type has a comment
//MyType implements [MyInterface]but it if it doesn't implement the interface - throw an error when a method on a receiver has a comment like
//MyType implements [MyInterface], but the method being implemented is not a method in the mentioned interface. This will help catch if a method is renamed in the interface, or mistyped when implemented.
Any chance this is in scope??
Metadata
Metadata
Assignees
Labels
No labels