mirror of
https://github.com/mgechev/revive.git
synced 2025-11-23 22:04:49 +02:00
Add rules
This commit is contained in:
@@ -74,6 +74,7 @@ func (w *lintVarDeclarations) Visit(node ast.Node) ast.Visitor {
|
||||
w.onFailure(lint.Failure{
|
||||
Confidence: 0.9,
|
||||
Node: rhs,
|
||||
Category: "zero-value",
|
||||
Failure: fmt.Sprintf("should drop = %s from declaration of var %s; it is the zero value", w.file.Render(rhs), v.Names[0]),
|
||||
})
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user