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

Null annotate ILogger.cs #9876

Merged
merged 3 commits into from
Mar 27, 2024
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
2 changes: 1 addition & 1 deletion src/Build/Logging/SimpleErrorLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public LoggerVerbosity Verbosity
set { }
}

public string Parameters
public string? Parameters
{
get => string.Empty;
set { }
Expand Down
4 changes: 1 addition & 3 deletions src/Framework/ILogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

using System.Runtime.InteropServices;

#nullable disable

namespace Microsoft.Build.Framework
{
/// <summary>
Expand Down Expand Up @@ -75,7 +73,7 @@ public interface ILogger
/// to defaults. If a logger does not take parameters, it can ignore this property.
/// </summary>
/// <value>The parameter string (can be null).</value>
string Parameters { get; set; }
string? Parameters { get; set; }

/// <summary>
/// Called by the build engine to allow loggers to subscribe to the events they desire.
Expand Down
2 changes: 1 addition & 1 deletion src/MSBuild/TerminalLogger/TerminalLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ internal TerminalLogger(ITerminal terminal)
public LoggerVerbosity Verbosity { get => LoggerVerbosity.Minimal; set { } }

/// <inheritdoc/>
public string Parameters
public string? Parameters
{
get => ""; set { }
}
Expand Down