Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 1.04 KB

Supported-.editorconfig-options.md

File metadata and controls

31 lines (24 loc) · 1.04 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.

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 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 --severity warn