mirror of
https://github.com/mgechev/revive.git
synced 2025-11-25 22:12:38 +02:00
fix: flag-parameter rule wrongly detects var definition and points to the function signature (#1213)
This commit is contained in:
@@ -69,6 +69,11 @@ func (w conditionVisitor) Visit(node ast.Node) ast.Visitor {
|
||||
return false
|
||||
}
|
||||
|
||||
_, ok = w.idents[ident.Name]
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
|
||||
return w.idents[ident.Name] == struct{}{}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user