Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix param nullability in IsAssemblyReferenced #4582

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
@@ -1 +1,2 @@
#nullable enable
Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.TestSource.IsAssemblyReferenced(System.Reflection.AssemblyName? assemblyName, string? source) -> bool
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,12 @@
/// <param name="assemblyName"> The assembly name. </param>
/// <param name="source"> The source. </param>
/// <returns> True if the assembly is referenced. </returns>
public bool IsAssemblyReferenced(AssemblyName assemblyName, string source)
public bool IsAssemblyReferenced(AssemblyName? assemblyName, string? source)

Check failure on line 82 in src/Adapter/MSTestAdapter.PlatformServices/Services/TestSource.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build MacOS Release)

src/Adapter/MSTestAdapter.PlatformServices/Services/TestSource.cs#L82

src/Adapter/MSTestAdapter.PlatformServices/Services/TestSource.cs(82,17): error RS0016: (NETCORE_ENGINEERING_TELEMETRY=Build) Symbol 'Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.TestSource.IsAssemblyReferenced(System.Reflection.AssemblyName? assemblyName, string? source) -> bool' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 82 in src/Adapter/MSTestAdapter.PlatformServices/Services/TestSource.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build MacOS Release)

src/Adapter/MSTestAdapter.PlatformServices/Services/TestSource.cs#L82

src/Adapter/MSTestAdapter.PlatformServices/Services/TestSource.cs(82,17): error RS0016: (NETCORE_ENGINEERING_TELEMETRY=Build) Symbol 'Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.TestSource.IsAssemblyReferenced(System.Reflection.AssemblyName? assemblyName, string? source) -> bool' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 82 in src/Adapter/MSTestAdapter.PlatformServices/Services/TestSource.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build MacOS Release)

src/Adapter/MSTestAdapter.PlatformServices/Services/TestSource.cs#L82

src/Adapter/MSTestAdapter.PlatformServices/Services/TestSource.cs(82,17): error RS0016: (NETCORE_ENGINEERING_TELEMETRY=Build) Symbol 'Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.TestSource.IsAssemblyReferenced(System.Reflection.AssemblyName? assemblyName, string? source) -> bool' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 82 in src/Adapter/MSTestAdapter.PlatformServices/Services/TestSource.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build MacOS Debug)

src/Adapter/MSTestAdapter.PlatformServices/Services/TestSource.cs#L82

src/Adapter/MSTestAdapter.PlatformServices/Services/TestSource.cs(82,17): error RS0016: (NETCORE_ENGINEERING_TELEMETRY=Build) Symbol 'Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.TestSource.IsAssemblyReferenced(System.Reflection.AssemblyName? assemblyName, string? source) -> bool' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 82 in src/Adapter/MSTestAdapter.PlatformServices/Services/TestSource.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build MacOS Debug)

src/Adapter/MSTestAdapter.PlatformServices/Services/TestSource.cs#L82

src/Adapter/MSTestAdapter.PlatformServices/Services/TestSource.cs(82,17): error RS0016: (NETCORE_ENGINEERING_TELEMETRY=Build) Symbol 'Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.TestSource.IsAssemblyReferenced(System.Reflection.AssemblyName? assemblyName, string? source) -> bool' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 82 in src/Adapter/MSTestAdapter.PlatformServices/Services/TestSource.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build MacOS Debug)

src/Adapter/MSTestAdapter.PlatformServices/Services/TestSource.cs#L82

src/Adapter/MSTestAdapter.PlatformServices/Services/TestSource.cs(82,17): error RS0016: (NETCORE_ENGINEERING_TELEMETRY=Build) Symbol 'Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.TestSource.IsAssemblyReferenced(System.Reflection.AssemblyName? assemblyName, string? source) -> bool' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 82 in src/Adapter/MSTestAdapter.PlatformServices/Services/TestSource.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build Linux Debug)

src/Adapter/MSTestAdapter.PlatformServices/Services/TestSource.cs#L82

src/Adapter/MSTestAdapter.PlatformServices/Services/TestSource.cs(82,17): error RS0016: (NETCORE_ENGINEERING_TELEMETRY=Build) Symbol 'Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.TestSource.IsAssemblyReferenced(System.Reflection.AssemblyName? assemblyName, string? source) -> bool' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 82 in src/Adapter/MSTestAdapter.PlatformServices/Services/TestSource.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build Linux Debug)

src/Adapter/MSTestAdapter.PlatformServices/Services/TestSource.cs#L82

src/Adapter/MSTestAdapter.PlatformServices/Services/TestSource.cs(82,17): error RS0016: (NETCORE_ENGINEERING_TELEMETRY=Build) Symbol 'Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.TestSource.IsAssemblyReferenced(System.Reflection.AssemblyName? assemblyName, string? source) -> bool' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 82 in src/Adapter/MSTestAdapter.PlatformServices/Services/TestSource.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build Linux Release)

src/Adapter/MSTestAdapter.PlatformServices/Services/TestSource.cs#L82

src/Adapter/MSTestAdapter.PlatformServices/Services/TestSource.cs(82,17): error RS0016: (NETCORE_ENGINEERING_TELEMETRY=Build) Symbol 'Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.TestSource.IsAssemblyReferenced(System.Reflection.AssemblyName? assemblyName, string? source) -> bool' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 82 in src/Adapter/MSTestAdapter.PlatformServices/Services/TestSource.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build Linux Release)

src/Adapter/MSTestAdapter.PlatformServices/Services/TestSource.cs#L82

src/Adapter/MSTestAdapter.PlatformServices/Services/TestSource.cs(82,17): error RS0016: (NETCORE_ENGINEERING_TELEMETRY=Build) Symbol 'Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.TestSource.IsAssemblyReferenced(System.Reflection.AssemblyName? assemblyName, string? source) -> bool' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 82 in src/Adapter/MSTestAdapter.PlatformServices/Services/TestSource.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build Linux Release)

src/Adapter/MSTestAdapter.PlatformServices/Services/TestSource.cs#L82

src/Adapter/MSTestAdapter.PlatformServices/Services/TestSource.cs(82,17): error RS0016: (NETCORE_ENGINEERING_TELEMETRY=Build) Symbol 'Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.TestSource.IsAssemblyReferenced(System.Reflection.AssemblyName? assemblyName, string? source) -> bool' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 82 in src/Adapter/MSTestAdapter.PlatformServices/Services/TestSource.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx

src/Adapter/MSTestAdapter.PlatformServices/Services/TestSource.cs#L82

src/Adapter/MSTestAdapter.PlatformServices/Services/TestSource.cs(82,17): error RS0016: (NETCORE_ENGINEERING_TELEMETRY=Build) Symbol 'Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.TestSource.IsAssemblyReferenced(System.Reflection.AssemblyName? assemblyName, string? source) -> bool' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 82 in src/Adapter/MSTestAdapter.PlatformServices/Services/TestSource.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx

src/Adapter/MSTestAdapter.PlatformServices/Services/TestSource.cs#L82

src/Adapter/MSTestAdapter.PlatformServices/Services/TestSource.cs(82,17): error RS0016: (NETCORE_ENGINEERING_TELEMETRY=Build) Symbol 'Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.TestSource.IsAssemblyReferenced(System.Reflection.AssemblyName? assemblyName, string? source) -> bool' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)
{
#if NETFRAMEWORK
// This loads the dll in a different app domain. We can optimize this to load in the current domain since this code could be run in a new app domain anyway.
bool? utfReference = AssemblyHelper.DoesReferencesAssembly(source, assemblyName);
// suppress null on DoesReferencesAssembly since it does actually allow nulls
bool? utfReference = AssemblyHelper.DoesReferencesAssembly(source!, assemblyName!);

// If no reference to UTF don't run discovery. Take conservative approach. If not able to find proceed with discovery.
return !utfReference.HasValue || utfReference.Value;
Expand Down
Loading