Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolayPianikov committed Jan 17, 2025
1 parent 3ae04d8 commit 26b6b20
Show file tree
Hide file tree
Showing 74 changed files with 508 additions and 508 deletions.
14 changes: 7 additions & 7 deletions CSharpInteractive.HostApi/BuildMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,27 @@ namespace HostApi;
public record BuildMessage(
Output Output,
BuildMessageState State,
IServiceMessage? ServiceMessage = default,
IServiceMessage? ServiceMessage = null,
string Text = "",
string ErrorDetails = "",
string Code = "",
string File = "",
string Subcategory = "",
string ProjectFile = "",
string SenderName = "",
int? ColumnNumber = default,
int? EndColumnNumber = default,
int? LineNumber = default,
int? EndLineNumber = default,
DotNetMessageImportance? Importance = default)
int? ColumnNumber = null,
int? EndColumnNumber = null,
int? LineNumber = null,
int? EndLineNumber = null,
DotNetMessageImportance? Importance = null)
{
/// <summary>
/// Contains the result of test execution when <see cref="State"/> is set to <see cref="BuildMessageState.TestResult"/>.
/// </summary>
public TestResult? TestResult =>
ServiceMessage != null && TryGetTestState(ServiceMessage.Name, out var testState)
? CreateResult(CreateKey(ServiceMessage), ServiceMessage, testState)
: default(TestResult?);
: null;

/// <inheritdoc />
public override string ToString() => Text;
Expand Down
12 changes: 6 additions & 6 deletions CSharpInteractive.HostApi/BuildStatistics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ namespace HostApi;
[ExcludeFromCodeCoverage]
[Target]
public record BuildStatistics(
int Errors = default,
int Warnings = default,
int Tests = default,
int FailedTests = default,
int IgnoredTests = default,
int PassedTests = default)
int Errors = 0,
int Warnings = 0,
int Tests = 0,
int FailedTests = 0,
int IgnoredTests = 0,
int PassedTests = 0)
{
/// <summary>
/// <c>True></c> if the statistic is empty, <c>False</c> if it contains any information.
Expand Down
16 changes: 8 additions & 8 deletions CSharpInteractive.HostApi/DockerRun.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,19 @@ public partial record DockerRun(
IEnumerable<(string host, string ip)> Hosts,
string ExecutablePath = "",
string WorkingDirectory = "",
int? CPUs = default,
int? CPUs = null,
string EntryPoint = "",
string HostName = "",
int? KernelMemory = default,
int? Memory = default,
string? Name = default,
int? KernelMemory = null,
int? Memory = null,
string? Name = null,
string Network = "",
string Platform = "",
bool? Privileged = default,
DockerPullType? Pull = default,
bool? Privileged = null,
DockerPullType? Pull = null,
bool Quiet = false,
bool? ReadOnly = default,
bool? AutoRemove = default,
bool? ReadOnly = null,
bool? AutoRemove = null,
string User = "",
string ContainerWorkingDirectory = "",
string EnvFile = "",
Expand Down
Loading

0 comments on commit 26b6b20

Please sign in to comment.