go-enry / go-license-detector

Reliable project licenses detector.
Other
127 stars 36 forks source link

Access additional license data #23

Closed pavelmemory closed 1 year ago

pavelmemory commented 2 years ago

The change in this PR addresses a problem described in the issue "Make license database public". In order to get access to additional license data the two new exportable functions were added:

The change also includes upgrade of the SPDX_DATA_VERSION to the latest at the moment 3.17 version. After the update the tool begun to panic because of the index access to the empty slice. The fix has been applied to solve that issue. After the upgrade the expected confidence in the tests were adjusted to the new results.

The one question that remains open here is why .mit-license.org literal is used in the licensedb/internal/assets/extract_urls.go? Should it be changed to the ://mit-license.org to have a proper URL format?

pavelmemory commented 2 years ago

@bzz could you please take a look at this PR? Unfortunately the list of the maintainers doesn't exist by the reference that is mentioned in the Contributing Guidelines

pavelmemory commented 2 years ago

Hi @lafriks! Thanks for taking an eye on my changes. Could you please explain why .mit-license.org is used instead of ://mit-license.org (the last paragraph in the PR description)?

pavelmemory commented 2 years ago

Seems like Lint job fails because golangci/golangci-lint-action needs to be updated or the configuration needs to be changed to use the newer version of the golangci-lint. I don't have permissions for doing this, so I rely on maintainers of the repository to do this.

Update: I have increased version of the golangci-lint tool to 1.47.0 version and fixed the issues.

vmarkovtsev commented 2 years ago

I don't think I have ever supported windows, it's ok to remove the CI checks for that OS.

pavelmemory commented 2 years ago

I don't think I have ever supported windows, it's ok to remove the CI checks for that OS.

@vmarkovtsev I have removed Windows OS from the actions, hope the CI will pass this time.

To1ne commented 2 years ago

Hey @vmarkovtsev, is there anything we can do to help get this PR over the finish line? @pavelmemory made the necessary changes to drop CI for Windows (this would actually close #22).

bzz commented 1 year ago

As CI is green now and there are new tests and review ✅ - I'll be merging this, if there is no further discussion.

As this change includes new API - it's a bit hard for me to say off hand how backward-compatible is it, and if it is - I assume v4.4.0 needs to be released, otherwise, it's v5.0.0.

WDYT?

lafriks commented 1 year ago

API seems to be backward compatible as only adds new methods so imho v4.4.0 is way to go

bzz commented 1 year ago

Closed&re-opened to trigger the CI, going to merge as soon as it passes. Then rebase #24 -> ✅ -> 🔪 v4.4.0

bzz commented 1 year ago

Linter complains on the licensedb/filer/filer.go that was not changed in this PR and thus is not relevant (would be nice to have a separate issue for handling it in the future).

bzz commented 1 year ago

...wonder what makes Race CI profile run 20min here, while it's only 6m in #24 🤔