Now that the go/types and types2 test files end in .go we must
avoid trying to format them as that won't work in general.
Change-Id: I05fdd95a0d26cbe746f6d618b22b48dc1f1ea749
Reviewed-on: https://go-review.googlesource.com/c/go/+/394295
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
t.Error(err)
return nil
}
- if isGoFile(d) {
+ // don't descend into testdata directories
+ if isGoFile(d) && !strings.Contains(filepath.ToSlash(filename), "/testdata/") {
filenames <- filename
nfiles++
}