From aaef307d155611ef702c83c9fcef4f892ec2840a Mon Sep 17 00:00:00 2001 From: Niv Govrin Date: Tue, 1 Oct 2024 09:09:00 +0000 Subject: [PATCH] fix: don't use builtin scanner in licensecheck Signed-off-by: Niv Govrin --- internal/licenses/parser.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/internal/licenses/parser.go b/internal/licenses/parser.go index 58e4deb2d229..c9f77d567848 100644 --- a/internal/licenses/parser.go +++ b/internal/licenses/parser.go @@ -22,7 +22,13 @@ func Parse(reader io.Reader, l file.Location) (licenses []pkg.License, err error if err != nil { return nil, err } - cov := licensecheck.Scan(contents) + + scanner, err := licensecheck.NewScanner(licensecheck.BuiltinLicenses()) + if err != nil { + return nil, err + } + + cov := scanner.Scan(contents) if cov.Percent < coverageThreshold { // unknown or no licenses here? return licenses, nil