Skip to content

Commit fe2c36c

Browse files
fix: Remove incorrect diagnostic for missing ASTs
1 parent ebfe810 commit fe2c36c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/index/package_ident.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"strings"
88

99
"github.com/agnivade/levenshtein"
10-
"github.com/charmbracelet/log"
1110
"golang.org/x/tools/go/packages"
1211
)
1312

@@ -22,7 +21,8 @@ func findBestPackageDefinitionPath(pkg *packages.Package) (*ast.File, error) {
2221
}
2322

2423
if len(pkg.Syntax) == 0 {
25-
log.Warn("package does not contain any ASTs", "path", pkg.PkgPath)
24+
// This case can be triggered when a package directory only contains `_test.go` files,
25+
// as those files will be compiled as part of a separate _test package.
2626
return nil, nil
2727
}
2828

0 commit comments

Comments
 (0)