Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="5.0.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing" Version="1.1.2" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing" Version="1.1.3" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="5.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
<PackageReference Include="NUnit" Version="4.4.0" />
<PackageReference Include="NUnit3TestAdapter" Version="5.2.0" />
<PackageReference Include="NUnit3TestAdapter" Version="6.1.0" />
<PackageReference Include="NUnit.Analyzers" Version="4.11.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
2 changes: 1 addition & 1 deletion DecoratorGenerator.UnitTests/Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
{
implementationAssembly,
GetAssembly("TestLibrary"),
Assembly.GetAssembly(typeof(DynamoDBContext)),

Check warning on line 202 in DecoratorGenerator.UnitTests/Tests.cs

View workflow job for this annotation

GitHub Actions / Unit tests (10.0.x)

Possible null reference argument for parameter 'assembly' in 'void MetadataReferenceCollection.Add(Assembly assembly)'.
},
Sources = { wrapperList, source },
GeneratedSources =
Expand Down Expand Up @@ -229,19 +229,19 @@
private static async Task<string> ReadFile(bool isTestLibrary, string searchPattern) {
var currentDirectory = GetCurrentDirectory();

var targetDirectory = isTestLibrary ? GetTestLibraryDirectory(currentDirectory) : currentDirectory;

Check warning on line 232 in DecoratorGenerator.UnitTests/Tests.cs

View workflow job for this annotation

GitHub Actions / Unit tests (10.0.x)

Possible null reference argument for parameter 'currentDirectory' in 'DirectoryInfo Tests.GetTestLibraryDirectory(DirectoryInfo currentDirectory)'.

var file = targetDirectory.GetFiles(searchPattern).First();

Check warning on line 234 in DecoratorGenerator.UnitTests/Tests.cs

View workflow job for this annotation

GitHub Actions / Unit tests (10.0.x)

Dereference of a possibly null reference.

using var fileReader = new StreamReader(file.OpenRead());
return await fileReader.ReadToEndAsync();
}

private static DirectoryInfo? GetCurrentDirectory() {
return Directory.GetParent(Directory.GetParent(AppDomain.CurrentDomain.BaseDirectory).Parent.Parent.FullName);
return Directory.GetParent(Directory.GetParent(AppDomain.CurrentDomain.BaseDirectory).Parent.FullName);

Check warning on line 241 in DecoratorGenerator.UnitTests/Tests.cs

View workflow job for this annotation

GitHub Actions / Unit tests (10.0.x)

Dereference of a possibly null reference.

Check warning on line 241 in DecoratorGenerator.UnitTests/Tests.cs

View workflow job for this annotation

GitHub Actions / Unit tests (10.0.x)

Dereference of a possibly null reference.
}

private static DirectoryInfo GetTestLibraryDirectory(DirectoryInfo currentDirectory) {
return currentDirectory.Parent.GetDirectories("TestLibrary").First();

Check warning on line 245 in DecoratorGenerator.UnitTests/Tests.cs

View workflow job for this annotation

GitHub Actions / Unit tests (10.0.x)

Dereference of a possibly null reference.
}
}
2 changes: 1 addition & 1 deletion DecoratorGenerator/DecoratorGenerator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="5.0.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="5.0.0" />
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="10.0.101">
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="10.0.102">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Loading