Skip to content

Latest commit

 

History

History
33 lines (25 loc) · 1.5 KB

Supported-.editorconfig-options.md

File metadata and controls

33 lines (25 loc) · 1.5 KB

Supported .editorconfig options

The dotnet-format global tool supports the core set of EditorConfig options* as well as the .NET coding convention settings for EditorConfig**.

Core options

  • indent_style
  • indent_size
  • tab_width
  • end_of_line
  • charset
  • insert_final_newline
  • root

[*] The options trim_trailing_whitespace and max_line_length are not supported. Currently insignificant whitespace is always removed by the formatter.

[**] Formatting conventions are enforced by default. Use the --fix-style option to enforce Language conventions and Naming conventions.

Removing unnecessary imports

In order to remove unnecessary imports the IDE0005 (unnecessary import) diagnostic id must be configured in your .editorconfig. When running dotnet-format pass the --fix-style option and specify a severity that includes the configured IDE0005 severity.

Example:

.editorconfig

root = true

[*.{cs,vb}]
dotnet_diagnostic.IDE0005.severity = warning

command

dotnet-format ./format.sln --fix-style warn