File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -237,6 +237,7 @@ func (cl ContextLoader) loadPackages(ctx context.Context, loadMode packages.Load
237
237
return retPkgs , nil
238
238
}
239
239
240
+ //nolint:gocyclo
240
241
func (cl ContextLoader ) Load (ctx context.Context , linters []linter.Config ) (* linter.Context , error ) {
241
242
loadMode := cl .findLoadMode (linters )
242
243
pkgs , err := cl .loadPackages (ctx , loadMode )
@@ -256,6 +257,21 @@ func (cl ContextLoader) Load(ctx context.Context, linters []linter.Config) (*lin
256
257
var ssaProg * ssa.Program
257
258
if loadMode == packages .LoadAllSyntax {
258
259
ssaProg = cl .buildSSAProgram (pkgs )
260
+ for _ , pkginfo := range prog .InitialPackages () {
261
+ if pkginfo == nil {
262
+ cl .log .Infof ("Pkginfo is nil" )
263
+ continue
264
+ }
265
+ if pkginfo .Pkg == nil {
266
+ cl .log .Infof ("Pkg %#v: types package is nil" , * pkginfo )
267
+ continue
268
+ }
269
+ ssaPkg := ssaProg .Package (pkginfo .Pkg )
270
+ if ssaPkg == nil {
271
+ cl .log .Infof ("Pkg %#v: ssaPkg is nil: %#v" , * pkginfo , * pkginfo .Pkg )
272
+ continue
273
+ }
274
+ }
259
275
}
260
276
261
277
astLog := cl .log .Child ("astcache" )
You can’t perform that action at this time.
0 commit comments