lint: support ignoring checks in all packages
Closes
@@ -84,6 +84,7 @@ func (l *Linter) ignore(j *Job, p Problem) bool {
pkg := j.Program.astFileMap[f].Pkg
for _, ig := range l.Ignores {
+ if ig.Pattern != "*" {
pkgpath := pkg.Path()
if strings.HasSuffix(pkgpath, "_test") {
pkgpath = pkgpath[:len(pkgpath)-len("_test")]
@@ -92,6 +93,7 @@ func (l *Linter) ignore(j *Job, p Problem) bool {
if m, _ := filepath.Match(ig.Pattern, name); !m {
continue
}
+ }
for _, c := range ig.Checks {
if m, _ := filepath.Match(c, j.check); m {
return true
