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 nullable on vstest.console #3694

Merged
merged 2 commits into from
Jun 2, 2022

Conversation

Evangelink
Copy link
Member

@Evangelink Evangelink commented May 30, 2022

Contributes to AB#1549371

src/vstest.console/CommandLine/Executor.cs Show resolved Hide resolved
{
if (source == null)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 38 we handle null source and here we don't. I have added a skip when null.

{
if (source is null)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are flowing down a list of sources where some items could be null.

src/vstest.console/Internal/ConsoleLogger.cs Outdated Show resolved Hide resolved
@@ -257,22 +256,23 @@ private static void PrintTimeSpan(TimeSpan timeSpan)
/// </summary>
private static string GetFormattedOutput(Collection<TestResultMessage> testMessageCollection)
{
if (testMessageCollection != null)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted the condition to reduce nesting.

src/vstest.console/Internal/ConsoleLogger.cs Outdated Show resolved Hide resolved
src/vstest.console/Internal/ConsoleLogger.cs Outdated Show resolved Hide resolved
src/vstest.console/Internal/ConsoleLogger.cs Outdated Show resolved Hide resolved
src/vstest.console/Internal/ConsoleLogger.cs Outdated Show resolved Hide resolved
src/vstest.console/Internal/ConsoleLogger.cs Outdated Show resolved Hide resolved
@Evangelink Evangelink merged commit 3334d18 into microsoft:main Jun 2, 2022
@Evangelink Evangelink deleted the vstest-nullable branch June 2, 2022 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants