Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Improve license resolution #71

Open
vladshcherbin opened this issue May 1, 2019 · 2 comments
Open

Improve license resolution #71

vladshcherbin opened this issue May 1, 2019 · 2 comments

Comments

@vladshcherbin
Copy link

Hey, 👋

License is not always shown, even if it's specified. Example:

https://nicedoc.io/substack/stream-handbook
https://github.com/substack/stream-handbook/blob/master/LICENSE

It would be also great to see a license if it's specified in package.json file (example) or even in readme (example).

@Kikobeats
Copy link
Contributor

Hey,

I agree with you but I'm not sure how to do that in a generic way.

Think this repository is oriented for any repository, not only npm packages!

Currently, the license is obtained from SPDX coming from GitHub API:

const license = get(info, 'license.spdx_id')

I did not find how GitHub determined it, but I feel that, if the field is missing, then the repository does not have enough information to determine it.

So my point is probably a better solution is to warn about that, more oriented to give users insights about missings things and how to fix them (see #67).

@vladshcherbin
Copy link
Author

Yep, I saw that issue.

However, there are so many packages which don't use license file. In most of my packages there is a license info in package.json and in readme, but they will be considered as non-license and give a warning in this case (I kinda dislike creating separate useless file for license when it's already mentioned in 2 places) 🤔

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

No branches or pull requests

2 participants