all: skip looking for package comments in .git/ repository (#15384)

This commit is contained in:
Simon Law 2025-03-21 14:46:02 -07:00 committed by GitHub
parent e1078686b3
commit 6bbf98bef4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -26,6 +26,9 @@ func TestPackageDocs(t *testing.T) {
if err != nil {
return err
}
if fi.Mode().IsDir() && path == ".git" {
return filepath.SkipDir // No documentation lives in .git
}
if fi.Mode().IsRegular() && strings.HasSuffix(path, ".go") {
if strings.HasSuffix(path, "_test.go") {
return nil