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

Enable nullables on all public API files #3808

Merged
merged 4 commits into from
Jun 29, 2022
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
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,10 @@ dotnet_diagnostic.CA1041.severity = warning # not default, increased severity to
# CA1837: Use Environment.ProcessId instead of Process.GetCurrentProcess().Id
dotnet_diagnostic.CA1837.severity = warning # not default, increased severity to ensure it is applied

# RS0041: Public members should not use oblivious types
# TODO: Move resx as internal OR use new resx generator (nullable aware) when available
dotnet_diagnostic.RS0041.severity = none # not default, decreased severity because of public resources (resx) not being nullable aware

#### C# Coding Conventions ####

# var preferences
Expand Down
1 change: 1 addition & 0 deletions src/AttachVS/PublicAPI/PublicAPI.Shipped.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
1 change: 1 addition & 0 deletions src/AttachVS/PublicAPI/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class InvalidManagedNameException :
, ISerializable
#endif
{
public InvalidManagedNameException(string message) : base(message) { }
public InvalidManagedNameException(string? message) : base(message) { }

#if !NETSTANDARD1_0 && !WINDOWS_UWP
protected InvalidManagedNameException(SerializationInfo info, StreamingContext context) : base(info, context) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Microsoft.TestPlatform.AdapterUtilities.HierarchyConstants
Microsoft.TestPlatform.AdapterUtilities.HierarchyConstants.Levels
Microsoft.TestPlatform.AdapterUtilities.ManagedNameConstants
Microsoft.TestPlatform.AdapterUtilities.ManagedNameUtilities.InvalidManagedNameException
Microsoft.TestPlatform.AdapterUtilities.ManagedNameUtilities.InvalidManagedNameException.InvalidManagedNameException(string! message) -> void
Microsoft.TestPlatform.AdapterUtilities.ManagedNameUtilities.InvalidManagedNameException.InvalidManagedNameException(string? message) -> void
Microsoft.TestPlatform.AdapterUtilities.ManagedNameUtilities.ManagedNameHelper
Microsoft.TestPlatform.AdapterUtilities.ManagedNameUtilities.ManagedNameParser
Microsoft.TestPlatform.AdapterUtilities.ManagedNameUtilities.ManagedNameParser.ManagedNameParser() -> void
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#nullable enable
Microsoft.TestPlatform.Build.Tasks.VSTestForwardingApp
Microsoft.TestPlatform.Build.Tasks.VSTestForwardingApp.Cancel() -> void
Microsoft.TestPlatform.Build.Tasks.VSTestForwardingApp.Execute() -> int
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
303 changes: 152 additions & 151 deletions src/Microsoft.TestPlatform.Common/PublicAPI/PublicAPI.Shipped.txt

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
2 changes: 1 addition & 1 deletion src/Microsoft.TestPlatform.Common/RunSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public RunSettings()
/// </summary>
/// <param name="settingsName">Name of the settings section to get.</param>
/// <returns>The settings provider for the settings or null if one was not found.</returns>
public ISettingsProvider? GetSettings(string settingsName)
public ISettingsProvider? GetSettings(string? settingsName)
{
if (settingsName.IsNullOrWhiteSpace())
{
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1 +1 @@

#nullable enable
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
const Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Helpers.DotnetHostHelper.MONOEXENAME = "mono" -> string
#nullable enable
const Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Helpers.DotnetHostHelper.MONOEXENAME = "mono" -> string!
Microsoft.VisualStudio.TestPlatform.CoreUtilities.Tracing.TestPlatformEventSource
Microsoft.VisualStudio.TestPlatform.CoreUtilities.Tracing.TestPlatformEventSource.AdapterDiscoveryStart(string executorUri) -> void
Microsoft.VisualStudio.TestPlatform.CoreUtilities.Tracing.TestPlatformEventSource.AdapterDiscoveryStart(string! executorUri) -> void
Microsoft.VisualStudio.TestPlatform.CoreUtilities.Tracing.TestPlatformEventSource.AdapterDiscoveryStop(long numberOfTests) -> void
Microsoft.VisualStudio.TestPlatform.CoreUtilities.Tracing.TestPlatformEventSource.AdapterExecutionStart(string executorUri) -> void
Microsoft.VisualStudio.TestPlatform.CoreUtilities.Tracing.TestPlatformEventSource.AdapterExecutionStart(string! executorUri) -> void
Microsoft.VisualStudio.TestPlatform.CoreUtilities.Tracing.TestPlatformEventSource.AdapterExecutionStop(long numberOfTests) -> void
Microsoft.VisualStudio.TestPlatform.CoreUtilities.Tracing.TestPlatformEventSource.AdapterSearchStart() -> void
Microsoft.VisualStudio.TestPlatform.CoreUtilities.Tracing.TestPlatformEventSource.AdapterSearchStop() -> void
Microsoft.VisualStudio.TestPlatform.CoreUtilities.Tracing.TestPlatformEventSource.DataCollectionStart(string dataCollectorUri) -> void
Microsoft.VisualStudio.TestPlatform.CoreUtilities.Tracing.TestPlatformEventSource.DataCollectionStart(string! dataCollectorUri) -> void
Microsoft.VisualStudio.TestPlatform.CoreUtilities.Tracing.TestPlatformEventSource.DataCollectionStop() -> void
Microsoft.VisualStudio.TestPlatform.CoreUtilities.Tracing.TestPlatformEventSource.DiscoveryRequestStart() -> void
Microsoft.VisualStudio.TestPlatform.CoreUtilities.Tracing.TestPlatformEventSource.DiscoveryRequestStop() -> void
Expand All @@ -33,7 +34,7 @@ Microsoft.VisualStudio.TestPlatform.CoreUtilities.Tracing.TestPlatformEventSourc
Microsoft.VisualStudio.TestPlatform.CoreUtilities.Tracing.TestPlatformEventSource.TestRunAttachmentsProcessingStop(long numberOfAttachments) -> void
Microsoft.VisualStudio.TestPlatform.CoreUtilities.Tracing.TestPlatformEventSource.TranslationLayerDiscoveryStart() -> void
Microsoft.VisualStudio.TestPlatform.CoreUtilities.Tracing.TestPlatformEventSource.TranslationLayerDiscoveryStop() -> void
Microsoft.VisualStudio.TestPlatform.CoreUtilities.Tracing.TestPlatformEventSource.TranslationLayerExecutionStart(long customTestHost, long sourcesCount, long testCasesCount, string runSettings) -> void
Microsoft.VisualStudio.TestPlatform.CoreUtilities.Tracing.TestPlatformEventSource.TranslationLayerExecutionStart(long customTestHost, long sourcesCount, long testCasesCount, string! runSettings) -> void
Microsoft.VisualStudio.TestPlatform.CoreUtilities.Tracing.TestPlatformEventSource.TranslationLayerExecutionStop() -> void
Microsoft.VisualStudio.TestPlatform.CoreUtilities.Tracing.TestPlatformEventSource.TranslationLayerInitializeStart() -> void
Microsoft.VisualStudio.TestPlatform.CoreUtilities.Tracing.TestPlatformEventSource.TranslationLayerInitializeStop() -> void
Expand All @@ -47,35 +48,35 @@ Microsoft.VisualStudio.TestPlatform.CoreUtilities.Tracing.TestPlatformEventSourc
Microsoft.VisualStudio.TestPlatform.CoreUtilities.Tracing.TestPlatformEventSource.VsTestConsoleStop() -> void
Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Helpers.DotnetHostHelper
Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Helpers.DotnetHostHelper.DotnetHostHelper() -> void
Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Helpers.DotnetHostHelper.DotnetHostHelper(Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.Interfaces.IFileHelper fileHelper, Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.Interfaces.IEnvironment environment) -> void
Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Helpers.DotnetHostHelper.GetDotnetPath() -> string
Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Helpers.DotnetHostHelper.GetMonoPath() -> string
Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Helpers.DotnetHostHelper.TryGetDotnetPathByArchitecture(Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.PlatformArchitecture targetArchitecture, out string muxerPath) -> bool
Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Helpers.DotnetHostHelper.DotnetHostHelper(Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.Interfaces.IFileHelper! fileHelper, Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.Interfaces.IEnvironment! environment) -> void
Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Helpers.DotnetHostHelper.GetDotnetPath() -> string!
Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Helpers.DotnetHostHelper.GetMonoPath() -> string!
Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Helpers.DotnetHostHelper.TryGetDotnetPathByArchitecture(Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.PlatformArchitecture targetArchitecture, out string? muxerPath) -> bool
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.FileHelper
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.FileHelper.CopyFile(string sourcePath, string destinationPath) -> void
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.FileHelper.CreateDirectory(string path) -> System.IO.DirectoryInfo
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.FileHelper.Delete(string path) -> void
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.FileHelper.DeleteEmptyDirectroy(string dirPath) -> void
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.FileHelper.DeleteDirectory(string directoryPath, bool recursive) -> void
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.FileHelper.GetTempPath() -> string
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.FileHelper.GetFileLength(string path) -> long
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.FileHelper.DirectoryExists(string path) -> bool
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.FileHelper.EnumerateFiles(string directory, System.IO.SearchOption searchOption, params string[] endsWithSearchPatterns) -> System.Collections.Generic.IEnumerable<string>
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.FileHelper.Exists(string path) -> bool
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.FileHelper.CopyFile(string! sourcePath, string! destinationPath) -> void
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.FileHelper.CreateDirectory(string! path) -> System.IO.DirectoryInfo!
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.FileHelper.Delete(string! path) -> void
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.FileHelper.DeleteEmptyDirectroy(string! dirPath) -> void
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.FileHelper.DeleteDirectory(string! directoryPath, bool recursive) -> void
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.FileHelper.GetTempPath() -> string!
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.FileHelper.GetFileLength(string! path) -> long
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.FileHelper.DirectoryExists(string? path) -> bool
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.FileHelper.EnumerateFiles(string! directory, System.IO.SearchOption searchOption, params string![]? endsWithSearchPatterns) -> System.Collections.Generic.IEnumerable<string!>!
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.FileHelper.Exists(string? path) -> bool
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.FileHelper.FileHelper() -> void
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.FileHelper.GetCurrentDirectory() -> string
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.FileHelper.GetFileAttributes(string path) -> System.IO.FileAttributes
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.FileHelper.GetFiles(string path, string searchPattern, System.IO.SearchOption searchOption) -> string[]
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.FileHelper.GetFileVersion(string path) -> System.Version
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.FileHelper.GetFullPath(string path) -> string
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.FileHelper.GetStream(string filePath, System.IO.FileMode mode, System.IO.FileAccess access = System.IO.FileAccess.ReadWrite) -> System.IO.Stream
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.FileHelper.GetStream(string filePath, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share) -> System.IO.Stream
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.FileHelper.MoveFile(string sourcePath, string destinationPath) -> void
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.FileHelper.WriteAllTextToFile(string filePath, string content) -> void
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.Interfaces.IFileHelper.CreateDirectory(string path) -> System.IO.DirectoryInfo
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.Interfaces.IFileHelper.EnumerateFiles(string directory, System.IO.SearchOption searchOption, params string[] endsWithSearchPatterns) -> System.Collections.Generic.IEnumerable<string>
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.Interfaces.IFileHelper.GetFileAttributes(string path) -> System.IO.FileAttributes
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.Interfaces.IFileHelper.GetFiles(string path, string searchPattern, System.IO.SearchOption searchOption) -> string[]
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.Interfaces.IFileHelper.GetStream(string filePath, System.IO.FileMode mode, System.IO.FileAccess access = System.IO.FileAccess.ReadWrite) -> System.IO.Stream
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.Interfaces.IFileHelper.GetStream(string filePath, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share) -> System.IO.Stream
static Microsoft.VisualStudio.TestPlatform.CoreUtilities.Tracing.TestPlatformEventSource.Instance.get -> Microsoft.VisualStudio.TestPlatform.CoreUtilities.Tracing.Interfaces.ITestPlatformEventSource
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.FileHelper.GetCurrentDirectory() -> string!
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.FileHelper.GetFileAttributes(string! path) -> System.IO.FileAttributes
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.FileHelper.GetFiles(string! path, string! searchPattern, System.IO.SearchOption searchOption) -> string![]!
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.FileHelper.GetFileVersion(string! path) -> System.Version!
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.FileHelper.GetFullPath(string! path) -> string!
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.FileHelper.GetStream(string! filePath, System.IO.FileMode mode, System.IO.FileAccess access = System.IO.FileAccess.ReadWrite) -> System.IO.Stream!
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.FileHelper.GetStream(string! filePath, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share) -> System.IO.Stream!
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.FileHelper.MoveFile(string! sourcePath, string! destinationPath) -> void
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.FileHelper.WriteAllTextToFile(string! filePath, string! content) -> void
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.Interfaces.IFileHelper.CreateDirectory(string! path) -> System.IO.DirectoryInfo!
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.Interfaces.IFileHelper.EnumerateFiles(string! directory, System.IO.SearchOption searchOption, params string![]? endsWithSearchPatterns) -> System.Collections.Generic.IEnumerable<string!>!
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.Interfaces.IFileHelper.GetFileAttributes(string! path) -> System.IO.FileAttributes
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.Interfaces.IFileHelper.GetFiles(string! path, string! searchPattern, System.IO.SearchOption searchOption) -> string![]!
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.Interfaces.IFileHelper.GetStream(string! filePath, System.IO.FileMode mode, System.IO.FileAccess access = System.IO.FileAccess.ReadWrite) -> System.IO.Stream!
Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.Interfaces.IFileHelper.GetStream(string! filePath, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share) -> System.IO.Stream!
static Microsoft.VisualStudio.TestPlatform.CoreUtilities.Tracing.TestPlatformEventSource.Instance.get -> Microsoft.VisualStudio.TestPlatform.CoreUtilities.Tracing.Interfaces.ITestPlatformEventSource!
Original file line number Diff line number Diff line change
@@ -1 +1 @@

#nullable enable
Loading