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

Apache-2.0 URL alone is enough to match the license; is this intentional? #40

Closed
ericphanson opened this issue Feb 17, 2021 · 2 comments

Comments

@ericphanson
Copy link

The Apache-2.0 URL (http://www.apache.org/licenses/LICENSE-2.0) alone counts as a match to the license. Text containing parts of other licenses usually does not produce a match, so I wanted to ask if this was intentional.

Here's the example using my Julia wrapper LicenseCheck.jl:

julia> using LicenseCheck

julia> licensecheck("http://www.apache.org/licenses/LICENSE-2.0")
(licenses_found = ["Apache-2.0"], license_file_percent_covered = 100.0)
@adg
Copy link
Collaborator

adg commented Jul 27, 2022

This is intentional. If the file is an 100% match for the Apache 2.0 URL then that is considered the license. If saw a LICENSE file in a repo that just contained that string, I'd infer the license was Apache 2.0.

@ericphanson
Copy link
Author

Ah OK, good to know.

In case it's helpful, I found some other URLs don't get recognized:

julia> using LicenseCheck

julia> licensecheck("https://opensource.org/licenses/MIT")
(licenses_found = String[], license_file_percent_covered = 0.0)

julia> licensecheck("https://www.gnu.org/licenses/gpl-3.0.en.html")
(licenses_found = String[], license_file_percent_covered = 0.0)

julia> licensecheck("https://www.gnu.org/licenses/gpl-3.0.txt")
(licenses_found = String[], license_file_percent_covered = 0.0)

julia> licensecheck("https://www.apache.org/licenses/LICENSE-1.1")
(licenses_found = String[], license_file_percent_covered = 0.0)

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

No branches or pull requests

2 participants