diff --git a/pkg/fanal/artifact/local/fs.go b/pkg/fanal/artifact/local/fs.go index 99499974e19b..2cd582fe1a9e 100644 --- a/pkg/fanal/artifact/local/fs.go +++ b/pkg/fanal/artifact/local/fs.go @@ -143,7 +143,7 @@ func (a Artifact) Inspect(ctx context.Context) (types.ArtifactReference, error) dir, filePath = path.Split(a.rootPath) } - if err = a.analyzer.AnalyzeFile(ctx, &wg, limit, result, dir, filePath, info, opener, nil, opts); err != nil { + if err := a.analyzer.AnalyzeFile(ctx, &wg, limit, result, dir, filePath, info, opener, nil, opts); err != nil { return xerrors.Errorf("analyze file (%s): %w", filePath, err) }