1
0
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:
chavacava
2025-01-28 14:53:32 +01:00
committed by GitHub
parent a600be2470
commit 8c5d8fc90a
2 changed files with 15 additions and 2 deletions

View File

@@ -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{}{}
}