Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wwhrd misidentifies ISC license in go-spew as 0BSD #40

Closed
TBBle opened this issue Nov 15, 2020 · 4 comments · Fixed by #46
Closed

wwhrd misidentifies ISC license in go-spew as 0BSD #40

TBBle opened this issue Nov 15, 2020 · 4 comments · Fixed by #46

Comments

@TBBle
Copy link

TBBle commented Nov 15, 2020

Observed in https://github.com/docker/compose-on-kubernetes, for some reason the vendored LICENSE from go-spew 1.1.1:

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

is being recognised as 0BSD:

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.

instead of ISC:

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

Unlike #18 it's definitely finding a license, but reporting the wrong one.

pkg.go.dev detects it correctly as ISC.

wwhrd Version:

version dev
commit 1961213
date 1961-02-13T20:06:35Z

I don't know where version numbering comes from, but the checkout in my go/src/github.com/frapposelli/wwhrd directory is 749cb0f

@TBBle TBBle changed the title wwhrd appears to misdetect ISC license in github.com/davecgh/go-spew/spew as 0BSD wwhrd misidentifies ISC license in go-spew as 0BSD Nov 15, 2020
@frapposelli
Copy link
Owner

Hi @TBBle I've looked at the problem and can definitely reproduce.

The issue at hand is that the license-detector library gives the go-spew license a 93% probability of being 0BSD and 84% of being ISC.

wwhrd takes the best result and uses it. Not sure why it's being misidentified but I've had similar troubles in the past with this package in particular, I'll dig deeper and file an issue on go-spew if needed.

@TBBle
Copy link
Author

TBBle commented Nov 17, 2020

The only other thing I noticed is that the Go source files are still missing the "/or" for which #18 was filed. But I am assuming the library doesn't look at them, as that would equally mismatch 0BSD and ISC.

@frapposelli
Copy link
Owner

I went spelunking in my history, looks like the previous license detector library was content with the /or fix which was added here davecgh/go-spew@e250ec7

The new library is using a different, more holistic approach, so I wouldn't be surprised if it evaluates other files and not just LICENSE. I'll try a fix in the coming days and send out a PR to davecgh/go-spew if it solves the problem 😄

@frapposelli
Copy link
Owner

frapposelli commented Nov 24, 2020

Hi @TBBle, I've just cut version v0.3.1, but the library update hasn't fixed your issue.

It looks like the library has changed hands now. I've opened an issue in the new repo (go-enry/go-license-detector#4). I'll keep this one open until we get to the bottom of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants