Skip to content

Commit

Permalink
Enable nullable for datacollector (#3670)
Browse files Browse the repository at this point in the history
  • Loading branch information
Evangelink authored May 25, 2022
1 parent 18ccf4b commit e485078
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
6 changes: 2 additions & 4 deletions src/datacollector/DataCollectorMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
using CommunicationUtilitiesResources = Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.Resources.Resources;
using CoreUtilitiesConstants = Microsoft.VisualStudio.TestPlatform.CoreUtilities.Constants;

#nullable disable

namespace Microsoft.VisualStudio.TestPlatform.DataCollector;

public class DataCollectorMain
Expand Down Expand Up @@ -70,7 +68,7 @@ internal DataCollectorMain(IProcessHelper processHelper, IEnvironment environmen
_requestHandler = requestHandler;
}

public void Run(string[] args)
public void Run(string[]? args)
{
DebuggerBreakpoint.AttachVisualStudioDebugger("VSTEST_DATACOLLECTOR_DEBUG_ATTACHVS");
DebuggerBreakpoint.WaitForDebugger("VSTEST_DATACOLLECTOR_DEBUG");
Expand Down Expand Up @@ -112,7 +110,7 @@ public void Run(string[] args)

UiLanguageOverride.SetCultureSpecifiedByUser();

EqtTrace.Info("DataCollectorMain.Run: Starting data collector run with args: {0}", string.Join(",", args));
EqtTrace.Info("DataCollectorMain.Run: Starting data collector run with args: {0}", args != null ? string.Join(",", args) : "null");

// Attach to exit of parent process
var parentProcessId = CommandLineArgumentsHelper.GetIntArgFromDict(argsDictionary, ParentProcessArgument);
Expand Down
2 changes: 0 additions & 2 deletions src/datacollector/MessageSink.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
using Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.DataCollection;
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging;

#nullable disable

namespace Microsoft.VisualStudio.TestPlatform.DataCollector;

/// <inheritdoc />
Expand Down
4 changes: 1 addition & 3 deletions src/datacollector/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

using Microsoft.VisualStudio.TestPlatform.ObjectModel;

#nullable disable

namespace Microsoft.VisualStudio.TestPlatform.DataCollector;

/// <summary>
Expand All @@ -20,7 +18,7 @@ public class Program
/// <param name="args">
/// The args.
/// </param>
public static void Main(string[] args)
public static void Main(string[]? args)
{
try
{
Expand Down
5 changes: 3 additions & 2 deletions src/datacollector/PublicAPI/PublicAPI.Shipped.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#nullable enable
Microsoft.VisualStudio.TestPlatform.DataCollector.DataCollectorMain
Microsoft.VisualStudio.TestPlatform.DataCollector.DataCollectorMain.DataCollectorMain() -> void
Microsoft.VisualStudio.TestPlatform.DataCollector.DataCollectorMain.Run(string[] args) -> void
Microsoft.VisualStudio.TestPlatform.DataCollector.DataCollectorMain.Run(string![]? args) -> void
Microsoft.VisualStudio.TestPlatform.DataCollector.Program
Microsoft.VisualStudio.TestPlatform.DataCollector.Program.Program() -> void
static Microsoft.VisualStudio.TestPlatform.DataCollector.Program.Main(string[] args) -> void
static Microsoft.VisualStudio.TestPlatform.DataCollector.Program.Main(string![]? args) -> void

0 comments on commit e485078

Please sign in to comment.