Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions tests/packagedcode/data/nuget/ExpressionLicense.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>ExpressionLicenseExample</id>
<version>1.0.0</version>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<license type="expression">MIT</license>
</metadata>
</package>
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
[
{
"type": "nuget",
"namespace": null,
"name": "ExpressionLicenseExample",
"version": "1.0.0",
"qualifiers": {},
"subpath": null,
"primary_language": null,
"description": null,
"release_date": null,
"parties": [],
"keywords": [],
"homepage_url": null,
"download_url": null,
"size": null,
"sha1": null,
"md5": null,
"sha256": null,
"sha512": null,
"bug_tracking_url": null,
"code_view_url": null,
"vcs_url": null,
"copyright": null,
"holder": null,
"declared_license_expression": "mit",
"declared_license_expression_spdx": "MIT",
"license_detections": [
{
"license_expression": "mit",
"license_expression_spdx": "MIT",
"matches": [
{
"license_expression": "mit",
"license_expression_spdx": "MIT",
"from_file": null,
"start_line": 1,
"end_line": 1,
"matcher": "1-spdx-id",
"score": 100.0,
"matched_length": 1,
"match_coverage": 100.0,
"rule_relevance": 100,
"rule_identifier": "spdx-license-identifier-mit-5da48780aba670b0860c46d899ed42a0f243ff06",
"rule_url": null,
"matched_text": "MIT"
}
],
"identifier": "mit-a822f434-d61f-f2b1-c792-8b8cb9e7b9bf"
}
],
"other_license_expression": null,
"other_license_expression_spdx": null,
"other_license_detections": [],
"extracted_license_statement": "MIT",
"notice_text": null,
"source_packages": [],
"file_references": [],
"is_private": false,
"is_virtual": false,
"extra_data": {},
"dependencies": [],
"repository_homepage_url": "https://www.nuget.org/packages/ExpressionLicenseExample/1.0.0",
"repository_download_url": "https://www.nuget.org/api/v2/package/ExpressionLicenseExample/1.0.0",
"api_data_url": "https://api.nuget.org/v3/registration3/expressionlicenseexample/1.0.0.json",
"datasource_id": "nuget_nupsec",
"purl": "pkg:nuget/ExpressionLicenseExample@1.0.0"
}
]
9 changes: 9 additions & 0 deletions tests/packagedcode/data/nuget/LicenseURLOnly.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>LicenseUrlOnlyExample</id>
<version>1.0.0</version>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<licenseUrl>https://opensource.org/licenses/MIT</licenseUrl>
</metadata>
</package>
69 changes: 69 additions & 0 deletions tests/packagedcode/data/nuget/LicenseURLOnly.nuspec.json.expected
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
[
{
"type": "nuget",
"namespace": null,
"name": "LicenseUrlOnlyExample",
"version": "1.0.0",
"qualifiers": {},
"subpath": null,
"primary_language": null,
"description": null,
"release_date": null,
"parties": [],
"keywords": [],
"homepage_url": null,
"download_url": null,
"size": null,
"sha1": null,
"md5": null,
"sha256": null,
"sha512": null,
"bug_tracking_url": null,
"code_view_url": null,
"vcs_url": null,
"copyright": null,
"holder": null,
"declared_license_expression": "mit",
"declared_license_expression_spdx": "MIT",
"license_detections": [
{
"license_expression": "mit",
"license_expression_spdx": "MIT",
"matches": [
{
"license_expression": "mit",
"license_expression_spdx": "MIT",
"from_file": null,
"start_line": 1,
"end_line": 1,
"matcher": "1-hash",
"score": 100.0,
"matched_length": 5,
"match_coverage": 100.0,
"rule_relevance": 100,
"rule_identifier": "mit_65.RULE",
"rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_65.RULE",
"matched_text": "https://opensource.org/licenses/MIT"
}
],
"identifier": "mit-8c45a313-6646-a283-ebeb-697e96d45185"
}
],
"other_license_expression": null,
"other_license_expression_spdx": null,
"other_license_detections": [],
"extracted_license_statement": "https://opensource.org/licenses/MIT",
"notice_text": null,
"source_packages": [],
"file_references": [],
"is_private": false,
"is_virtual": false,
"extra_data": {},
"dependencies": [],
"repository_homepage_url": "https://www.nuget.org/packages/LicenseUrlOnlyExample/1.0.0",
"repository_download_url": "https://www.nuget.org/api/v2/package/LicenseUrlOnlyExample/1.0.0",
"api_data_url": "https://api.nuget.org/v3/registration3/licenseurlonlyexample/1.0.0.json",
"datasource_id": "nuget_nupsec",
"purl": "pkg:nuget/LicenseUrlOnlyExample@1.0.0"
}
]
8 changes: 8 additions & 0 deletions tests/packagedcode/data/nuget/NoLicenseInfo.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>NoLicenseInfoExample</id>
<version>1.0.0</version>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
</metadata>
</package>
46 changes: 46 additions & 0 deletions tests/packagedcode/data/nuget/NoLicenseInfo.nuspec.json.expected
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
[
{
"type": "nuget",
"namespace": null,
"name": "NoLicenseInfoExample",
"version": "1.0.0",
"qualifiers": {},
"subpath": null,
"primary_language": null,
"description": null,
"release_date": null,
"parties": [],
"keywords": [],
"homepage_url": null,
"download_url": null,
"size": null,
"sha1": null,
"md5": null,
"sha256": null,
"sha512": null,
"bug_tracking_url": null,
"code_view_url": null,
"vcs_url": null,
"copyright": null,
"holder": null,
"declared_license_expression": null,
"declared_license_expression_spdx": null,
"license_detections": [],
"other_license_expression": null,
"other_license_expression_spdx": null,
"other_license_detections": [],
"extracted_license_statement": null,
"notice_text": null,
"source_packages": [],
"file_references": [],
"is_private": false,
"is_virtual": false,
"extra_data": {},
"dependencies": [],
"repository_homepage_url": "https://www.nuget.org/packages/NoLicenseInfoExample/1.0.0",
"repository_download_url": "https://www.nuget.org/api/v2/package/NoLicenseInfoExample/1.0.0",
"api_data_url": "https://api.nuget.org/v3/registration3/nolicenseinfoexample/1.0.0.json",
"datasource_id": "nuget_nupsec",
"purl": "pkg:nuget/NoLicenseInfoExample@1.0.0"
}
]
9 changes: 9 additions & 0 deletions tests/packagedcode/data/nuget/PlainLicense.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>PlainLicenseExample</id>
<version>1.0.0</version>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<license>MIT</license>
</metadata>
</package>
69 changes: 69 additions & 0 deletions tests/packagedcode/data/nuget/PlainLicense.nuspec.json.expected
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
[
{
"type": "nuget",
"namespace": null,
"name": "PlainLicenseExample",
"version": "1.0.0",
"qualifiers": {},
"subpath": null,
"primary_language": null,
"description": null,
"release_date": null,
"parties": [],
"keywords": [],
"homepage_url": null,
"download_url": null,
"size": null,
"sha1": null,
"md5": null,
"sha256": null,
"sha512": null,
"bug_tracking_url": null,
"code_view_url": null,
"vcs_url": null,
"copyright": null,
"holder": null,
"declared_license_expression": "mit",
"declared_license_expression_spdx": "MIT",
"license_detections": [
{
"license_expression": "mit",
"license_expression_spdx": "MIT",
"matches": [
{
"license_expression": "mit",
"license_expression_spdx": "MIT",
"from_file": null,
"start_line": 1,
"end_line": 1,
"matcher": "1-spdx-id",
"score": 100.0,
"matched_length": 1,
"match_coverage": 100.0,
"rule_relevance": 100,
"rule_identifier": "spdx-license-identifier-mit-5da48780aba670b0860c46d899ed42a0f243ff06",
"rule_url": null,
"matched_text": "MIT"
}
],
"identifier": "mit-a822f434-d61f-f2b1-c792-8b8cb9e7b9bf"
}
],
"other_license_expression": null,
"other_license_expression_spdx": null,
"other_license_detections": [],
"extracted_license_statement": "MIT",
"notice_text": null,
"source_packages": [],
"file_references": [],
"is_private": false,
"is_virtual": false,
"extra_data": {},
"dependencies": [],
"repository_homepage_url": "https://www.nuget.org/packages/PlainLicenseExample/1.0.0",
"repository_download_url": "https://www.nuget.org/api/v2/package/PlainLicenseExample/1.0.0",
"api_data_url": "https://api.nuget.org/v3/registration3/plainlicenseexample/1.0.0.json",
"datasource_id": "nuget_nupsec",
"purl": "pkg:nuget/PlainLicenseExample@1.0.0"
}
]
10 changes: 10 additions & 0 deletions tests/packagedcode/data/nuget/SpecFlow.MsTest.3.1.89.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>SpecFlow.MsTest</id>
<version>3.1.89</version>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<license type="file">LICENSE.txt</license>
<licenseUrl>https://aka.ms/deprecateLicenseUrl</licenseUrl>
</metadata>
</package>
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
[
{
"type": "nuget",
"namespace": null,
"name": "SpecFlow.MsTest",
"version": "3.1.89",
"qualifiers": {},
"subpath": null,
"primary_language": null,
"description": null,
"release_date": null,
"parties": [],
"keywords": [],
"homepage_url": null,
"download_url": null,
"size": null,
"sha1": null,
"md5": null,
"sha256": null,
"sha512": null,
"bug_tracking_url": null,
"code_view_url": null,
"vcs_url": null,
"copyright": null,
"holder": null,
"declared_license_expression": "unknown-license-reference",
"declared_license_expression_spdx": "LicenseRef-scancode-unknown-license-reference",
"license_detections": [
{
"license_expression": "unknown-license-reference",
"license_expression_spdx": "LicenseRef-scancode-unknown-license-reference",
"matches": [
{
"license_expression": "unknown-license-reference",
"license_expression_spdx": "LicenseRef-scancode-unknown-license-reference",
"from_file": null,
"start_line": 1,
"end_line": 1,
"matcher": "1-hash",
"score": 90.0,
"matched_length": 3,
"match_coverage": 100.0,
"rule_relevance": 90,
"rule_identifier": "unknown-license-reference_339.RULE",
"rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/unknown-license-reference_339.RULE",
"matched_text": "license LICENSE.txt"
}
],
"identifier": "unknown_license_reference-bf47ad8c-fa3f-0e58-e5e5-d0aef2c37b43"
}
],
"other_license_expression": null,
"other_license_expression_spdx": null,
"other_license_detections": [],
"extracted_license_statement": "LICENSE.txt",
"notice_text": null,
"source_packages": [],
"file_references": [],
"is_private": false,
"is_virtual": false,
"extra_data": {},
"dependencies": [],
"repository_homepage_url": "https://www.nuget.org/packages/SpecFlow.MsTest/3.1.89",
"repository_download_url": "https://www.nuget.org/api/v2/package/SpecFlow.MsTest/3.1.89",
"api_data_url": "https://api.nuget.org/v3/registration3/specflow.mstest/3.1.89.json",
"datasource_id": "nuget_nupsec",
"purl": "pkg:nuget/SpecFlow.MsTest@3.1.89"
}
]
Loading
Loading