File tree 1 file changed +5
-4
lines changed 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -607,16 +607,17 @@ func (v *visitor) Visit(node ast.Node) ast.Visitor {
607
607
return v
608
608
}
609
609
610
+ // checkAssignment checks the assignment statement and returns a boolean value
611
+ // indicating whether to continue checking the substructure in AssignStmt or not
610
612
func (v * visitor ) checkAssignment (lhs , rhs []ast.Expr ) (followed bool ) {
611
- followed = true
612
613
if len (rhs ) == 1 {
613
614
// single value on rhs; check against lhs identifiers
614
615
if call , ok := rhs [0 ].(* ast.CallExpr ); ok {
615
616
if ! v .blank {
616
- return
617
+ return true
617
618
}
618
619
if v .ignoreCall (call ) {
619
- return
620
+ return true
620
621
}
621
622
isError := v .errorsByArg (call )
622
623
for i := 0 ; i < len (lhs ); i ++ {
@@ -674,7 +675,7 @@ func (v *visitor) checkAssignment(lhs, rhs []ast.Expr) (followed bool) {
674
675
}
675
676
}
676
677
677
- return
678
+ return true
678
679
}
679
680
680
681
func (v * visitor ) checkAssertExpr (expr * ast.TypeAssertExpr ) {
You can’t perform that action at this time.
0 commit comments