Skip to content

Commit

Permalink
Update gochecknoglobals to support version exception (#601)
Browse files Browse the repository at this point in the history
  • Loading branch information
liamawhite authored and jirfag committed Sep 9, 2019
1 parent 136b271 commit e1a7422
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/golinters/gochecknoglobals.go
Expand Up @@ -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
Expand Down

0 comments on commit e1a7422

Please sign in to comment.