1
0
mirror of https://github.com/mgechev/revive.git synced 2025-07-15 01:04:40 +02:00
This commit is contained in:
chavacava
2023-01-26 22:50:35 +01:00
committed by GitHub
parent 54ee9dbcde
commit a4f4632a3f
2 changed files with 10 additions and 0 deletions

View File

@ -37,6 +37,11 @@ type lintNestedStructs struct {
func (l *lintNestedStructs) Visit(n ast.Node) ast.Visitor {
switch v := n.(type) {
case *ast.TypeSpec:
_, isInterface := v.Type.(*ast.InterfaceType)
if isInterface {
return nil // do not analyze interface declarations
}
case *ast.FuncDecl:
if v.Body != nil {
ast.Walk(l, v.Body)

View File

@ -40,3 +40,8 @@ type Bad struct {
type issue744 struct {
c chan struct{}
}
// issue 781
type mySetInterface interface {
GetSet() map[string]struct{}
}