1
0
mirror of https://github.com/mgechev/revive.git synced 2025-11-23 22:04:49 +02:00

Add rules

This commit is contained in:
mgechev
2018-01-25 10:35:27 -08:00
parent 6c220f5a65
commit 7d066071ce
11 changed files with 391 additions and 173 deletions

View File

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