3 ms·
This is nice, but the way they gather license data has serious limitations if it hasn't improved in the last year. https://lwn.net/Articles/636261/ https://lw
by sciurus 10y ago
This is nice, but the way they gather license data has
serious limitations if it hasn't improved in the last year.
https://lwn.net/Articles/636261/ https://lwn.net/Articles/636261/
- justinlardinois 10y agoI 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.
- dankohn1 10y agoGithub uses an open source gem [0] to detect the license. You're welcome to contribute enhancements. [0] https://github.com/benbalter/licensee https://github.com/benbalter/licensee
- justinlardinois 10y agoI'm aware, I read the post.
- sciurus 10y agoLooks like although the README says it only looks at LICENSE, it has improved and checks more files; nice! https://github.com/benbalter/licensee/blob/3692df44ab32772a98a3aec8a44080f7dbe3d50a/lib/licensee/project_files/license_file.rb#L15-L25 https://github.com/benbalter/licensee/blob/3692df44ab32772a9...
- kmewhort 10y agoThis 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 :)