Skip to content

Conversation

@kchenery
Copy link
Contributor

What is the purpose of the change

Ensure that the C# nuget packages expose their license via SPDX expression

Verifying this change

This change added tests and can be verified as follows:

  • Added tests to teh Avro.test project that validate the nuget packages created

Documentation

  • Does this pull request introduce a new feature?
    no

@github-actions github-actions bot added the C# label Nov 27, 2025
@kchenery kchenery changed the title AVRO-4214: Ensure nuget packages expose license via SPDX expression AVRO-4214: [C#] Ensure nuget packages expose license via SPDX expression Nov 27, 2025
@kchenery kchenery changed the title AVRO-4214: [C#] Ensure nuget packages expose license via SPDX expression AVRO-4214: [C#] Ensure nuget packages expose SPDX license expression Nov 27, 2025
Assert.Fail($"No .nuspec file found in package: {nupkgPath}");
}

using (var stream = nuspecEntry.Open())

Check warning

Code scanning / CodeQL

Dereferenced variable may be null Warning test

Variable
nuspecEntry
may be null at this access as suggested by
this
null check.
{
// Find the lang/csharp root (4 levels up from test binary directory: bin/Release/net8.0 -> test -> apache -> src -> csharp)
var testDir = TestContext.CurrentContext.TestDirectory;
var csharpRoot = Path.GetFullPath(Path.Combine(testDir, "..", "..", "..", "..", ".."));

Check notice

Code scanning / CodeQL

Call to System.IO.Path.Combine Note test

Call to 'System.IO.Path.Combine'.
@martin-g martin-g merged commit 5df0055 into apache:main Dec 1, 2025
8 checks passed
@martin-g
Copy link
Member

martin-g commented Dec 1, 2025

Thank you, @kchenery !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants