aboutcode-org / scancode-toolkit

:mag: ScanCode detects licenses, copyrights, dependencies by "scanning code" ... to discover and inventory open source and third-party packages used in your code. Sponsored by NLnet project https://nlnet.nl/project/vulnerabilitydatabase, the Google Summer of Code, Azure credits, nexB and others generous sponsors!
https://github.com/aboutcode-org/scancode-toolkit/releases/
2.07k stars 536 forks source link

Github API and search by license: consider this for improved detection #1283

Open pombredanne opened 5 years ago

pombredanne commented 5 years ago

See "Searching GitHub by license type" https://help.github.com/articles/licensing-a-repository/

These may be material for new license rules?

You can filter repositories based on their license or license family using the license qualifier and the exact license keyword:

License License keyword
Academic Free License v3.0 afl-3.0
Apache license 2.0 apache-2.0
Artistic license 2.0 artistic-2.0
Boost Software License 1.0 bs1-1.0
BSD 2-clause "Simplified" license bsd-2-clause
BSD 3-clause "New" or "Revised" license bsd-3-clause
BSD 3-clause Clear license bsd-3-clause-clear
Creative Commons license family cc
Creative Commons Zero v1.0 Universal cc0-1.0
Creative Commons Attribution 4.0 cc-by-4.0
Creative Commons Attribution Share Alike 4.0 cc-by-sa-4.0
Do What The F*ck You Want To Public License wtfpl
Educational Community License v2.0 ecl-2.0
Eclipse Public License 1.0 epl-1.0
European Union Public License 1.1 eupl-1.1
GNU Affero General Public License v3.0 agpl-3.0
GNU General Public License family gpl
GNU General Public License v2.0 gpl-2.0
GNU General Public License v3.0 gpl-3.0
GNU Lesser General Public License family lgpl
GNU Lesser General Public License v2.1 lgpl-2.1
GNU Lesser General Public License v3.0 lgpl-3.0
ISC isc
LaTeX Project Public License v1.3c lppl-1.3c
Microsoft Public License ms-pl
MIT mit
Mozilla Public License 2.0 mpl-2.0
Open Software License 3.0 osl-3.0
PostgreSQL License postgresql
SIL Open Font License 1.1 ofl-1.1
University of Illinois/NCSA Open Source License ncsa
The Unlicense unlicense
zLib License zlib
sbs2001 commented 4 years ago

I would like to work on this. Can you provide some additional details about, what exactly needs to be done?

pombredanne commented 4 years ago

repaste from the giiter chat at: https://gitter.im/aboutcode-org/discuss?at=5da81c05809de9699f5148a9

the first thing is to understand how license detection works. You can browse the code under src/licensedcode or more simply check some doc https://github.com/nexB/scancode-toolkit/wiki/How-to:-Add-new-license-rules-for-enhanced-detection and examples of what we call license detection rules under src/licensedcode/data/rules

I think the first approach would be to craft tests for each of the license names and codes in nexB/scancode-toolkit#1283 .... and determine for each what is the scancode license key

saif007s commented 3 years ago

I am beginner in the issue can you please suggest me how to get started