Update gochecknoglobals to support version exception (#601)

See 7c3491d2b6
This commit is contained in:
Liam White 2019-09-09 14:42:51 +01:00 committed by Isaev Denis
parent 136b27171a
commit e1a7422dd5

View File

@ -61,7 +61,7 @@ func (lint Gochecknoglobals) checkFile(f *ast.File, fset *token.FileSet) []resul
}
func isWhitelisted(i *ast.Ident) bool {
return i.Name == "_" || looksLikeError(i)
return i.Name == "_" || i.Name == "version" || looksLikeError(i)
}
// looksLikeError returns true if the AST identifier starts