From a2c3e11b3e140252fe2ff774b9e3435e29361690 Mon Sep 17 00:00:00 2001 From: kkHAIKE Date: Sat, 27 Aug 2022 20:51:36 +0800 Subject: [PATCH] skip import check --- contextcheck.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contextcheck.go b/contextcheck.go index 45b6274..a560e0d 100644 --- a/contextcheck.go +++ b/contextcheck.go @@ -94,7 +94,7 @@ func NewRun(pkgs []*packages.Package, disableFact bool) func(pass *analysis.Pass } return func(pass *analysis.Pass) (interface{}, error) { // skip different repo - if !m[strings.Split(pass.Pkg.Path(), "/")[0]] { + if len(m) > 0 && !m[strings.Split(pass.Pkg.Path(), "/")[0]] { return nil, nil } @@ -221,9 +221,9 @@ func (r *runner) noImportedContextAndHttp(f *ssa.Function) (ret bool) { } func (r *runner) checkIsEntry(f *ssa.Function) entryType { - if r.noImportedContextAndHttp(f) { - return EntryNormal - } + // if r.noImportedContextAndHttp(f) { + // return EntryNormal + // } ctxIn, ctxOut := r.checkIsCtx(f) if ctxOut {