Skip to content

Commit

Permalink
fix: don't use builtin scanner in licensecheck
Browse files Browse the repository at this point in the history
  • Loading branch information
govrin committed Oct 1, 2024
1 parent f5f8005 commit a47e169
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion internal/licenses/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a47e169

Please sign in to comment.