Skip to content

Commit

Permalink
correct licenses
Browse files Browse the repository at this point in the history
  • Loading branch information
sensslen committed Aug 12, 2024
1 parent 8753910 commit 165596b
Show file tree
Hide file tree
Showing 16 changed files with 53 additions and 23 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/assets/App/allowedLicenses.json
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
["MIT","Apache-2.0","MS-EULA"]
[
"MIT",
"Apache-2.0",
"MS-EULA"
]
4 changes: 3 additions & 1 deletion .github/workflows/assets/App/ignorePackages.json
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
["NETStandard.Library"]
[
"NETStandard.Library"
]
5 changes: 4 additions & 1 deletion .github/workflows/assets/App/projectsToCheck.json
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
["./src/NuGetLicenseCore/NuGetLicenseCore.csproj","./src/NuGetLicenseFramework/NuGetLicenseFramework.csproj"]
[
"./src/NuGetLicenseCore/NuGetLicenseCore.csproj",
"./src/NuGetLicenseFramework/NuGetLicenseFramework.csproj"
]
3 changes: 1 addition & 2 deletions .github/workflows/assets/App/urlToLicenseMapping.json
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
{
}
{}
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
["MIT","Apache-2.0","MS-EULA"]
[
"MIT",
"Apache-2.0",
"MS-EULA"
]
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
["NETStandard.Library"]
[
"NETStandard.Library"
]
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
[
]
[]
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
["./integration/ProjectWithReferenceContainingLicenseExpression/ProjectWithReferenceContainingLicenseExpression.csproj"]
[
"./integration/ProjectWithReferenceContainingLicenseExpression/ProjectWithReferenceContainingLicenseExpression.csproj"
]
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
{
}
{}
7 changes: 6 additions & 1 deletion .github/workflows/assets/Tests/allowedLicenses.json
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
["MIT","Apache-2.0","MS-EULA","BSD-3-Clause"]
[
"MIT",
"Apache-2.0",
"MS-EULA",
"BSD-3-Clause"
]
4 changes: 3 additions & 1 deletion .github/workflows/assets/Tests/ignorePackages.json
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
["NETStandard.Library"]
[
"NETStandard.Library"
]
Original file line number Diff line number Diff line change
Expand Up @@ -114,5 +114,13 @@
"Copyright": "\u00A9 Microsoft Corporation. All rights reserved.",
"Authors": "Microsoft",
"License": "MIT"
},
{
"Id": "Microsoft.NETCore.Platforms",
"Version": "1.1.0",
"ProjectUrl": "https://dot.net/",
"Copyright": "\u00A9 Microsoft Corporation. All rights reserved.",
"Authors": "Microsoft",
"License": "MIT"
}
]
4 changes: 3 additions & 1 deletion .github/workflows/assets/Tests/projectsToCheck.json
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
["./tests/NuGetUtility.Test/NuGetUtility.Test.csproj"]
[
"./tests/NuGetUtility.Test/NuGetUtility.Test.csproj"
]
3 changes: 1 addition & 2 deletions .github/workflows/assets/Tests/urlToLicenseMapping.json
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
{
}
{}
2 changes: 1 addition & 1 deletion src/NuGetUtility/LicenseValidator/LicenseValidator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ private bool IsLicenseValid(string licenseId)

private string GetLicenseNotAllowedMessage(string license)
{
return $"License {license} not found in list of supported licenses";
return $"License \"{license}\" not found in list of supported licenses";
}

private Uri GetLicenseUrl(string spdxIdentifier)
Expand Down
10 changes: 5 additions & 5 deletions tests/NuGetUtility.Test/LicenseValidator/LicenseValidatorTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ public async Task ValidatingLicensesWithExpressionLicenseInformation_Should_Give
LicenseInformationOrigin.Expression,
new List<ValidationError>
{
new ValidationError($"License {license} not found in list of supported licenses",
new ValidationError($"License \"{license}\" not found in list of supported licenses",
_context)
})
})
Expand Down Expand Up @@ -665,7 +665,7 @@ public async Task ValidatingLicensesWithExpressionLicenseInformation_Should_Give
LicenseInformationOrigin.Expression,
new List<ValidationError>
{
new ValidationError($"License {expression} not found in list of supported licenses",
new ValidationError($"License \"{expression}\" not found in list of supported licenses",
_context)
})
})
Expand Down Expand Up @@ -705,7 +705,7 @@ public async Task ValidatingLicensesWithExpressionLicenseInformation_Should_Give
LicenseInformationOrigin.Expression,
new List<ValidationError>
{
new ValidationError($"License {expression} not found in list of supported licenses",
new ValidationError($"License \"{expression}\" not found in list of supported licenses",
_context)
})
})
Expand Down Expand Up @@ -736,7 +736,7 @@ public async Task ValidatingLicensesWithOverwriteLicenseInformation_Should_GiveC
LicenseInformationOrigin.Overwrite,
new List<ValidationError>
{
new ValidationError($"License {license} not found in list of supported licenses",
new ValidationError($"License \"{license}\" not found in list of supported licenses",
_context)
})
})
Expand Down Expand Up @@ -874,7 +874,7 @@ public async Task ValidatingLicensesWithMatchingUrlInformation_Should_GiveCorrec
LicenseInformationOrigin.Url,
new List<ValidationError>
{
new ValidationError($"License {urlMatch.Value} not found in list of supported licenses",
new ValidationError($"License \"{urlMatch.Value}\" not found in list of supported licenses",
_context)
})
})
Expand Down

0 comments on commit 165596b

Please sign in to comment.