Skip to content

chore: Enable nullable annotations for part of the files - #2944

Merged
timcassell merged 1 commit into
dotnet:masterfrom
filzrev:chore-enable-nullable-5
Jan 15, 2026
Merged

timcassell merged 1 commit into
dotnet:masterfrom
filzrev:chore-enable-nullable-5

Conversation

@filzrev

@filzrev filzrev commented Dec 27, 2025

Copy link
Copy Markdown
Contributor

This PR intended to fix a part issue #2815

By enabling #nullable enable and fix nullable errors.

@filzrev
filzrev force-pushed the chore-enable-nullable-5 branch from 4f0caff to 720fb7f Compare December 27, 2025 23:23
int iterationCount = DefaultValue,
int invocationCount = DefaultValue,
string? id = null,
string id = "",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This modification don't change existing behaviors.
Because when null or empty string is passed. Id characteristic is not set.

Environment.NewLine,
benchmarkCase.Descriptor.WorkloadMethod.GetParameters()
.Select((parameter, index) => $"private {GetFieldType(parameter.ParameterType, benchmarkCase.Parameters.GetArgument(parameter.Name)).GetCorrectCSharpTypeName()} __argField{index};"));
.Select((parameter, index) => $"private {GetFieldType(parameter.ParameterType, benchmarkCase.Parameters.GetArgument(parameter.Name!)).GetCorrectCSharpTypeName()} __argField{index};"));

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

parameter.Name is ensured to be not null except for return paramenter

@filzrev
filzrev marked this pull request as draft December 28, 2025 00:43
@filzrev
filzrev force-pushed the chore-enable-nullable-5 branch from 720fb7f to 3203b9c Compare December 28, 2025 17:09
yield return RuntimeValidator.DontFailOnError;
}

public IOrderer Orderer => null;

@filzrev filzrev Dec 28, 2025 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Following property must be nullable.

  • ArtifactsPath
  • SummaryStyle
  • Orderer
  • CategoryDiscoverer
  • CultureInfo

Because it need to represent value is not set.(It's used for merge multiple configs)

@filzrev
filzrev force-pushed the chore-enable-nullable-5 branch 3 times, most recently from 708b8bd to fe024d2 Compare December 28, 2025 17:39
@filzrev
filzrev force-pushed the chore-enable-nullable-5 branch from fe024d2 to b3f8d0c Compare December 28, 2025 18:56
@filzrev
filzrev marked this pull request as ready for review December 28, 2025 23:27
@timcassell
timcassell merged commit 25914b8 into dotnet:master Jan 15, 2026
@timcassell timcassell added this to the v0.16.0 milestone Jan 15, 2026
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