A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-format below:

dotnet format command - .NET CLI

This article applies to: ✔️ .NET 6.x SDK and later versions

Name

dotnet format - Formats code to match editorconfig settings.

Synopsis
dotnet format [<PROJECT | SOLUTION>] [command] [options]

dotnet format -h|--help
Description

dotnet format is a code formatter that applies style preferences and static analysis recommendations to a project or solution. Preferences will be read from an .editorconfig file, if present, otherwise a default set of preferences will be used. For more information, see the EditorConfig documentation.

Arguments

PROJECT | SOLUTION

The MSBuild project or solution to run code formatting on. If a project or solution file is not specified, MSBuild searches the current working directory for a file that has a file extension that ends in proj or sln, and uses that file.

Options

None of the options below are required for the dotnet format command to succeed, but you can use them to further customize what is formatted and by which rules.

Subcommands Whitespace

dotnet format whitespace - Formats code to match editorconfig settings for whitespace.

Description

The dotnet format whitespace subcommand only runs formatting rules associated with whitespace formatting. For a complete list of possible formatting options that you can specify in your .editorconfig file, see the C# formatting options.

Options Style

dotnet format style - Formats code to match EditorConfig settings for code style.

Description

The dotnet format style subcommand only runs formatting rules associated with code style formatting. For a complete list of formatting options that you can specify in your editorconfig file, see Code style rules.

Options Analyzers

dotnet format analyzers - Formats code to match editorconfig settings for analyzers (excluding code style rules).

Description

The dotnet format analyzers subcommand only runs formatting rules associated with analyzers. For a list of analyzer rules that you can specify in your editorconfig file, see Quality rules.

Options Examples

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4