error-chain
error-chain copied to clipboard
"license: unknown-license" badge on repository page
Yet Cargo.toml
contains licence field:
license = "MIT/Apache-2.0"
Yeah, I don't know why... Maybe then only check the LICENSE
file.
That seems to be correct. a) shields seems to use the github API (https://github.com/badges/shields/blob/b74107eb3d4301c192e5dfd6d252e8a3b90d16bf/suggest.js#L36) b) the github API seems to rely on a license file (https://developer.github.com/v3/licenses/#get-a-repositorys-license)
Also Github seems to show licence in tabs (Example "Apache 2.0" in https://github.com/rust-lang/cargo/ )
3,571 commits 5 branches 17 releases 264 contributors Apache-2.0
making such shields redundant.
Ideally, someone should update github's license detection to look at Cargo metadata too.
You can report it to Github feedback page. They have internal issue/feature request tracker and always reply something.
GitHub documentation says they're using the licensee ruby gem. While they do have some heuristics for detecting fields of package managers (e.g. gemspec, bower), licensee appears to recommend just sticking the license text in the repository and not relying upon the field of the package manager. I'm guessing those language ecosystem specific heuristics are a bit old and from a long time ago and are grandfathered in. I don't see CPAN, D, Elm, or really any wide assortment of matchers for ecosystems in their matchers.
Licensee could be updated, but I would wager that the request won't be accepted.
Or... maybe they do. I guess I just wasn't looking hard enough. That said, they do say the R people explicitly recommend not including the license text.
https://github.com/benbalter/licensee/pull/129