Re:License now displayed on repository overview
by kmewhort on Thursday September 22, 2016 @03:42PM
(#12559701)
This is tough problem to solve given how many different ways projects have to declare licenses. I run a project called git.legal and we do ALL of the following, but still don't quite a get a 100% hit rate of finding a project's license:
1. Check for a license declaration in package manager metadata (eg. package.json)
2. Check for a license.txt file or try to parse out a readme's license section, and do a full-text diff against known licenses
3. Check the readme for an extensive set of regular expressions matching known license identifiers and common declarations such as "licensed under ...".
4. Check for a consistent license declaration in project source file headers
This gets about a 97% hit rate, but even for "hits" it's sometimes unclear what specific license version a project is under. For example, many projects just say "licensed under MIT"...but "MIT" isn't a specific license. There are several versions of it and there's no way to know which version the author intends to use for the project. That might be a minute point, but this all adds up to a lot of uncertainty around licensing.
So, project authors, please use metadata and include a specific version :)
Re:License now displayed on repository overview
by justinlardinois on Wednesday September 21, 2016 @09:24PM
(#12553640)
I was thinking the same thing. Just a few years ago GitHub used to automatically "figure out" what programming language your project was in, and it was pretty bad.
Re:License now displayed on repository overview
by dankohn1 on Wednesday September 21, 2016 @10:05PM
(#12553801)
Github uses an open source gem [0] to detect the license. You're welcome to contribute enhancements.
Re:License now displayed on repository overview
by sciurus on Thursday September 22, 2016 @10:19AM
(#12556941)
Looks like although the README says it only looks at LICENSE, it has improved and checks more files; nice!
https://github.com/benbalter/licensee/blob/3692df44ab32772a9...
Re:License now displayed on repository overview
by justinlardinois on Wednesday September 21, 2016 @11:53PM
(#12554204)
I'm aware, I read the post.
https://lwn.net/Articles/636261/