mirror of
				https://github.com/mgechev/revive.git
				synced 2025-10-30 23:37:49 +02:00 
			
		
		
		
	| @@ -43,6 +43,11 @@ func (l *lintNestedStructs) Visit(n ast.Node) ast.Visitor { | ||||
| 		} | ||||
| 		return nil | ||||
| 	case *ast.Field: | ||||
| 		_, isChannelField := v.Type.(*ast.ChanType) | ||||
| 		if isChannelField { | ||||
| 			return nil | ||||
| 		} | ||||
|  | ||||
| 		filter := func(n ast.Node) bool { | ||||
| 			switch n.(type) { | ||||
| 			case *ast.StructType: | ||||
|   | ||||
							
								
								
									
										5
									
								
								testdata/nested-structs.go
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								testdata/nested-structs.go
									
									
									
									
										vendored
									
									
								
							| @@ -35,3 +35,8 @@ func fred() interface{} { | ||||
| type Bad struct { | ||||
| 	Field []struct{} // MATCH /no nested structs are allowed/ | ||||
| } | ||||
|  | ||||
| // issue744 | ||||
| type issue744 struct { | ||||
| 	c chan struct{} | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user