Skip to content

Commit

Permalink
Rename license match attribute for spdx expression
Browse files Browse the repository at this point in the history
Reference: #3838
Reported-by: Armijn Hemel
Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
  • Loading branch information
AyanSinhaMahapatra committed Jul 5, 2024
1 parent e26187a commit c568766
Show file tree
Hide file tree
Showing 819 changed files with 4,920 additions and 4,920 deletions.
2 changes: 1 addition & 1 deletion src/licensedcode/match.py
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ def to_dict(
result = {}

result['license_expression'] = self.rule.license_expression
result['spdx_license_expression'] = self.rule.spdx_license_expression()
result['license_expression_spdx'] = self.rule.spdx_license_expression()
result['from_file'] = file_path
result['start_line'] = self.start_line
result['end_line'] = self.end_line
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"matches": [
{
"license_expression": "apache-1.1",
"spdx_license_expression": "Apache-1.1",
"license_expression_spdx": "Apache-1.1",
"from_file": "LICENSE",
"start_line": 7,
"end_line": 70,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"matches": [
{
"license_expression": "pygres-2.2",
"spdx_license_expression": "LicenseRef-scancode-pygres-2.2",
"license_expression_spdx": "LicenseRef-scancode-pygres-2.2",
"from_file": "LICENSE2",
"start_line": 7,
"end_line": 22,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"matches": [
{
"license_expression": "pcre",
"spdx_license_expression": "LicenseRef-scancode-pcre",
"license_expression_spdx": "LicenseRef-scancode-pcre",
"from_file": "LICENSE3",
"start_line": 1,
"end_line": 47,
Expand Down
18 changes: 9 additions & 9 deletions tests/cluecode/data/plugin_filter_clues/filtered-expected4.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
"matches": [
{
"license_expression": "gpl-1.0-plus OR artistic-1.0",
"spdx_license_expression": "GPL-1.0-or-later OR Artistic-1.0",
"license_expression_spdx": "GPL-1.0-or-later OR Artistic-1.0",
"from_file": "LICENSE4",
"start_line": 3,
"end_line": 11,
Expand All @@ -178,7 +178,7 @@
},
{
"license_expression": "gpl-1.0",
"spdx_license_expression": "GPL-1.0-only",
"license_expression_spdx": "GPL-1.0-only",
"from_file": "LICENSE4",
"start_line": 13,
"end_line": 13,
Expand All @@ -192,7 +192,7 @@
},
{
"license_expression": "gpl-1.0",
"spdx_license_expression": "GPL-1.0-only",
"license_expression_spdx": "GPL-1.0-only",
"from_file": "LICENSE4",
"start_line": 17,
"end_line": 19,
Expand All @@ -206,7 +206,7 @@
},
{
"license_expression": "gpl-1.0",
"spdx_license_expression": "GPL-1.0-only",
"license_expression_spdx": "GPL-1.0-only",
"from_file": "LICENSE4",
"start_line": 21,
"end_line": 270,
Expand All @@ -220,7 +220,7 @@
},
{
"license_expression": "artistic-1.0",
"spdx_license_expression": "Artistic-1.0",
"license_expression_spdx": "Artistic-1.0",
"from_file": "LICENSE4",
"start_line": 273,
"end_line": 273,
Expand All @@ -234,7 +234,7 @@
},
{
"license_expression": "artistic-1.0",
"spdx_license_expression": "Artistic-1.0",
"license_expression_spdx": "Artistic-1.0",
"from_file": "LICENSE4",
"start_line": 277,
"end_line": 279,
Expand All @@ -248,7 +248,7 @@
},
{
"license_expression": "artistic-1.0",
"spdx_license_expression": "Artistic-1.0",
"license_expression_spdx": "Artistic-1.0",
"from_file": "LICENSE4",
"start_line": 281,
"end_line": 281,
Expand All @@ -262,7 +262,7 @@
},
{
"license_expression": "artistic-1.0",
"spdx_license_expression": "Artistic-1.0",
"license_expression_spdx": "Artistic-1.0",
"from_file": "LICENSE4",
"start_line": 283,
"end_line": 372,
Expand All @@ -276,7 +276,7 @@
},
{
"license_expression": "warranty-disclaimer",
"spdx_license_expression": "LicenseRef-scancode-warranty-disclaimer",
"license_expression_spdx": "LicenseRef-scancode-warranty-disclaimer",
"from_file": "LICENSE4",
"start_line": 374,
"end_line": 376,
Expand Down
40 changes: 20 additions & 20 deletions tests/formattedcode/data/common/manifests-expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"matches": [
{
"license_expression": "cddl-1.0",
"spdx_license_expression": "CDDL-1.0",
"license_expression_spdx": "CDDL-1.0",
"from_file": "manifests/maven/persistence-api-1.0.pom",
"start_line": 1,
"end_line": 1,
Expand All @@ -48,7 +48,7 @@
},
{
"license_expression": "cddl-1.0",
"spdx_license_expression": "CDDL-1.0",
"license_expression_spdx": "CDDL-1.0",
"from_file": "manifests/maven/persistence-api-1.0.pom",
"start_line": 2,
"end_line": 2,
Expand Down Expand Up @@ -131,7 +131,7 @@
"matches": [
{
"license_expression": "apache-2.0",
"spdx_license_expression": "Apache-2.0",
"license_expression_spdx": "Apache-2.0",
"from_file": "manifests/npm-license-mapping/package.json",
"start_line": 1,
"end_line": 1,
Expand All @@ -153,7 +153,7 @@
"matches": [
{
"license_expression": "apache-2.0",
"spdx_license_expression": "Apache-2.0",
"license_expression_spdx": "Apache-2.0",
"from_file": "manifests/npm-license-mapping/package.json",
"start_line": 1,
"end_line": 1,
Expand Down Expand Up @@ -236,7 +236,7 @@
"matches": [
{
"license_expression": "mit",
"spdx_license_expression": "MIT",
"license_expression_spdx": "MIT",
"from_file": "manifests/npm-license-string/package.json",
"start_line": 1,
"end_line": 1,
Expand Down Expand Up @@ -876,7 +876,7 @@
"matches": [
{
"license_expression": "cddl-1.0",
"spdx_license_expression": "CDDL-1.0",
"license_expression_spdx": "CDDL-1.0",
"from_file": "manifests/maven/persistence-api-1.0.pom",
"start_line": 1,
"end_line": 1,
Expand All @@ -891,7 +891,7 @@
},
{
"license_expression": "cddl-1.0",
"spdx_license_expression": "CDDL-1.0",
"license_expression_spdx": "CDDL-1.0",
"from_file": "manifests/maven/persistence-api-1.0.pom",
"start_line": 2,
"end_line": 2,
Expand Down Expand Up @@ -940,7 +940,7 @@
"matches": [
{
"license_expression": "unknown-license-reference",
"spdx_license_expression": "LicenseRef-scancode-unknown-license-reference",
"license_expression_spdx": "LicenseRef-scancode-unknown-license-reference",
"from_file": "manifests/maven/persistence-api-1.0.pom",
"start_line": 17,
"end_line": 19,
Expand All @@ -954,7 +954,7 @@
},
{
"license_expression": "cddl-1.0",
"spdx_license_expression": "CDDL-1.0",
"license_expression_spdx": "CDDL-1.0",
"from_file": "manifests/maven/persistence-api-1.0.pom",
"start_line": 18,
"end_line": 20,
Expand Down Expand Up @@ -1077,7 +1077,7 @@
"matches": [
{
"license_expression": "apache-2.0",
"spdx_license_expression": "Apache-2.0",
"license_expression_spdx": "Apache-2.0",
"from_file": "manifests/npm-license-mapping/package.json",
"start_line": 1,
"end_line": 1,
Expand All @@ -1099,7 +1099,7 @@
"matches": [
{
"license_expression": "apache-2.0",
"spdx_license_expression": "Apache-2.0",
"license_expression_spdx": "Apache-2.0",
"from_file": "manifests/npm-license-mapping/package.json",
"start_line": 1,
"end_line": 1,
Expand Down Expand Up @@ -1261,7 +1261,7 @@
"matches": [
{
"license_expression": "apache-2.0",
"spdx_license_expression": "Apache-2.0",
"license_expression_spdx": "Apache-2.0",
"from_file": "manifests/npm-license-mapping/package.json",
"start_line": 6,
"end_line": 6,
Expand All @@ -1282,7 +1282,7 @@
"matches": [
{
"license_expression": "apache-2.0",
"spdx_license_expression": "Apache-2.0",
"license_expression_spdx": "Apache-2.0",
"from_file": "manifests/npm-license-mapping/package.json",
"start_line": 20,
"end_line": 20,
Expand Down Expand Up @@ -1409,7 +1409,7 @@
"matches": [
{
"license_expression": "mit",
"spdx_license_expression": "MIT",
"license_expression_spdx": "MIT",
"from_file": "manifests/npm-license-string/package.json",
"start_line": 1,
"end_line": 1,
Expand Down Expand Up @@ -1512,7 +1512,7 @@
"matches": [
{
"license_expression": "mit",
"spdx_license_expression": "MIT",
"license_expression_spdx": "MIT",
"from_file": "manifests/npm-license-string/package.json",
"start_line": 4,
"end_line": 4,
Expand Down Expand Up @@ -1643,7 +1643,7 @@
"matches": [
{
"license_expression": "lgpl-3.0",
"spdx_license_expression": "LGPL-3.0-only",
"license_expression_spdx": "LGPL-3.0-only",
"from_file": "manifests/pypi/bluepyopt_setup.py",
"start_line": 1,
"end_line": 1,
Expand All @@ -1665,7 +1665,7 @@
"matches": [
{
"license_expression": "lgpl-3.0",
"spdx_license_expression": "LGPL-3.0-only",
"license_expression_spdx": "LGPL-3.0-only",
"from_file": "manifests/pypi/bluepyopt_setup.py",
"start_line": 1,
"end_line": 1,
Expand Down Expand Up @@ -1832,7 +1832,7 @@
"matches": [
{
"license_expression": "lgpl-3.0",
"spdx_license_expression": "LGPL-3.0-only",
"license_expression_spdx": "LGPL-3.0-only",
"from_file": "manifests/pypi/bluepyopt_setup.py",
"start_line": 9,
"end_line": 20,
Expand All @@ -1853,7 +1853,7 @@
"matches": [
{
"license_expression": "lgpl-3.0",
"spdx_license_expression": "LGPL-3.0-only",
"license_expression_spdx": "LGPL-3.0-only",
"from_file": "manifests/pypi/bluepyopt_setup.py",
"start_line": 65,
"end_line": 65,
Expand All @@ -1874,7 +1874,7 @@
"matches": [
{
"license_expression": "lgpl-3.0",
"spdx_license_expression": "LGPL-3.0-only",
"license_expression_spdx": "LGPL-3.0-only",
"from_file": "manifests/pypi/bluepyopt_setup.py",
"start_line": 74,
"end_line": 75,
Expand Down
Loading

0 comments on commit c568766

Please sign in to comment.