Skip to content

Commit e1a7422

Browse files
liamawhitejirfag
authored andcommitted
Update gochecknoglobals to support version exception (#601)
See leighmcculloch/gochecknoglobals@7c3491d
1 parent 136b271 commit e1a7422

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/golinters/gochecknoglobals.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func (lint Gochecknoglobals) checkFile(f *ast.File, fset *token.FileSet) []resul
6161
}
6262

6363
func isWhitelisted(i *ast.Ident) bool {
64-
return i.Name == "_" || looksLikeError(i)
64+
return i.Name == "_" || i.Name == "version" || looksLikeError(i)
6565
}
6666

6767
// looksLikeError returns true if the AST identifier starts

0 commit comments

Comments
 (0)