Skip to content

Commit

Permalink
Add more license rules
Browse files Browse the repository at this point in the history
Adds additional license rules to take care of maven
package license detection adjustments.

Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
  • Loading branch information
AyanSinhaMahapatra committed Jul 13, 2023
1 parent d27a33c commit e3a1c90
Show file tree
Hide file tree
Showing 13 changed files with 142 additions and 7 deletions.
10 changes: 10 additions & 0 deletions src/licensedcode/data/rules/apache-2.0_1276.RULE
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
license_expression: apache-2.0
is_license_tag: yes
ignorable_urls:
- https://www.apache.org/licenses/LICENSE-2.0.txt
---

name: Apache License, Version 2.0
url: https://www.apache.org/licenses/LICENSE-2.0.txt
comments: A business-friendly OSS license
10 changes: 10 additions & 0 deletions src/licensedcode/data/rules/apache-2.0_1277.RULE
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
license_expression: apache-2.0
is_license_tag: yes
ignorable_urls:
- http://www.apache.org/licenses/LICENSE-2.0.txt
---

name: The Apache Software License, Version 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.txt
comments: A business-friendly OSS license
9 changes: 9 additions & 0 deletions src/licensedcode/data/rules/apache-2.0_1278.RULE
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
license_expression: apache-2.0
is_license_tag: yes
ignorable_urls:
- http://www.apache.org/licenses/
---

name: ASL, version 2
url: http://www.apache.org/licenses/
9 changes: 9 additions & 0 deletions src/licensedcode/data/rules/apache-2.0_1279.RULE
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
license_expression: apache-2.0
is_license_tag: yes
ignorable_urls:
- http://www.apache.org/licenses/LICENSE-2.0.txt
---

name: Apache License v2.0
url: http://www.apache.org/licenses/LICENSE-2.0.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
license_expression: bsd-3-clause-no-nuclear-warranty
is_license_tag: yes
referenced_filenames:
- LICENSE-Sun.txt
---

name: {{BSD 3-clause License w/nuclear disclaimer}}
url: LICENSE-Sun.txt
9 changes: 9 additions & 0 deletions src/licensedcode/data/rules/bsd-new_1301.RULE
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
license_expression: bsd-new
is_license_tag: yes
ignorable_urls:
- http://www.jcraft.com/jzlib/LICENSE.txt
---

name: BSD
url: http://www.jcraft.com/jzlib/LICENSE.txt
10 changes: 10 additions & 0 deletions src/licensedcode/data/rules/cpl-1.0_38.RULE
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
license_expression: cpl-1.0
is_license_tag: yes
ignorable_urls:
- http://www.opensource.org/licenses/cpl1.0.txt
---

name: CPL
url: http://www.opensource.org/licenses/cpl1.0.txt
comments: Common Public License
9 changes: 9 additions & 0 deletions src/licensedcode/data/rules/jj2000_1.RULE
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
license_expression: jj2000
is_license_tag: yes
referenced_filenames:
- LICENSE-JJ2000.txt
---

name: {{JJ2000}}
url: LICENSE-JJ2000.txt
33 changes: 33 additions & 0 deletions src/licensedcode/data/rules/json_17.RULE
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
license_expression: json
is_license_text: yes
ignorable_copyrights:
- Copyright (c) 2002 JSON.org
ignorable_holders:
- JSON.org
ignorable_urls:
- http://json.org/license.html
---

name: The JSON License
url: http://json.org/license.html
comments:

Copyright (c) 2002 JSON.org

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.

The Software shall be used for Good, not Evil.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9 changes: 9 additions & 0 deletions src/licensedcode/data/rules/lgpl-2.1-plus_473.RULE
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
license_expression: lgpl-2.1-plus
is_license_tag: yes
ignorable_urls:
- http://www.gnu.org/licenses/lgpl.html
---

name: GNU Lesser Public License
url: http://www.gnu.org/licenses/lgpl.html
9 changes: 9 additions & 0 deletions src/licensedcode/data/rules/lgpl-2.1_444.RULE
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
license_expression: lgpl-2.1
is_license_tag: yes
ignorable_urls:
- http://www.gnu.org/licenses/licenses.html
---

name: LGPL, version 2.1
url: http://www.gnu.org/licenses/licenses.html
9 changes: 9 additions & 0 deletions src/licensedcode/data/rules/unicode-icu-58_2.RULE
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
license_expression: unicode-icu-58
is_license_tag: yes
ignorable_urls:
- http://source.icu-project.org/repos/icu/trunk/icu4j/main/shared/licenses/LICENSE
---

name: Unicode/ICU License
url: http://source.icu-project.org/repos/icu/trunk/icu4j/main/shared/licenses/LICENSE
14 changes: 7 additions & 7 deletions tests/packagedcode/data/m2/bytebuddy/pom.xml.package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,18 @@
{
"score": 100.0,
"start_line": 1,
"end_line": 2,
"matched_length": 18,
"end_line": 3,
"matched_length": 23,
"match_coverage": 100.0,
"matcher": "2-aho",
"matcher": "1-hash",
"license_expression": "apache-2.0",
"rule_identifier": "apache-2.0_40.RULE",
"rule_identifier": "apache-2.0_1277.RULE",
"rule_relevance": 100,
"rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_40.RULE",
"matched_text": "- name: The Apache Software License, Version 2.0\n url: http://www.apache.org/licenses/LICENSE-2.0.txt"
"rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_1277.RULE",
"matched_text": "- name: The Apache Software License, Version 2.0\n url: http://www.apache.org/licenses/LICENSE-2.0.txt\n comments: A business-friendly OSS license"
}
],
"identifier": "apache_2_0-bfa9e97a-62d3-0076-c881-8443e5e95192"
"identifier": "apache_2_0-a0cd95bb-90a3-a708-8b40-d282f4168353"
}
],
"other_license_expression": null,
Expand Down

0 comments on commit e3a1c90

Please sign in to comment.