Skip to content

Commit

Permalink
fix: don't use builtin scanner in licensecheck (#3290)
Browse files Browse the repository at this point in the history
Signed-off-by: Niv Govrin <[email protected]>
  • Loading branch information
govrin authored Oct 1, 2024
1 parent 93beceb commit dbad17d
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 dbad17d

Please sign in to comment.