Table of Contents

Class DotNetFormat

Namespace
DotNetDo
Assembly
DotNetDo.Core.dll

Applies or verifies whitespace, style, and analyzer fixes across a project or solution.

public sealed record DotNetFormat : DotNetTargetCommand, IEquatable<ExecOptions>, IEquatable<ToolCommand>, IEquatable<ToolCommand<ExecResult>>, IEquatable<ExecToolCommand>, IEquatable<DotNetTargetCommand>, IEquatable<DotNetFormat>

Inheritance

Implements

Properties

BinaryLog

Writes an MSBuild binary log to this path.

public string? BinaryLog { get; init; }

Property Value

string?

Command

Selects which formatting category the command processes.

public FormatCommand? Command { get; init; }

Property Value

FormatCommand?

CommandParts

Gets every canonically ordered rendered command fragment.

protected override IReadOnlyList<string?> CommandParts { get; }

Property Value

IReadOnlyList<string?>

CustomCommand

Selects the workspace-loading operation used internally by the formatter.

public string? CustomCommand { get; init; }

Property Value

string?

Diagnostics

Runs only the specified diagnostic IDs.

public IReadOnlyList<string> Diagnostics { get; init; }

Property Value

IReadOnlyList<string>

Exclude

Excludes the specified files or folders from formatting.

public IReadOnlyList<string> Exclude { get; init; }

Property Value

IReadOnlyList<string>

ExcludeDiagnostics

Excludes the specified diagnostic IDs from formatting.

public IReadOnlyList<string> ExcludeDiagnostics { get; init; }

Property Value

IReadOnlyList<string>

Include

Formats only the specified files or folders, interpreted relative to the workspace.

public IReadOnlyList<string> Include { get; init; }

Property Value

IReadOnlyList<string>

IncludeGenerated

Includes generated-code files that formatting normally skips.

public bool IncludeGenerated { get; init; }

Property Value

bool

NoRestore

Skips implicit restore; assets must already be current.

public bool NoRestore { get; init; }

Property Value

bool

Report

Writes a JSON report describing files and diagnostics changed by formatting.

public string? Report { get; init; }

Property Value

string?

Severity

Applies diagnostics at or above the specified severity.

public string? Severity { get; init; }

Property Value

string?

VerifyNoChanges

Checks formatting and fails when files would change, without rewriting them.

public bool VerifyNoChanges { get; init; }

Property Value

bool