Skip to content

Implement .editorconfig file formatting in same way as template generator #104

@FrediKats

Description

@FrediKats

Need to implement command that convert

dotnet_diagnostic.CA2241.severity = warning
dotnet_diagnostic.CA2237.severity = none
dotnet_diagnostic.CA2235.severity = none

into

dotnet_diagnostic.CA2235.severity = none
dotnet_diagnostic.CA2237.severity = none
dotnet_diagnostic.CA2241.severity = warning

Expected result layout:

< values that shouldn't be formatter>
# Autoformatted values
[*.cs]
### IDE ###
# Remove this or Me qualification (IDE0003)
# Add this or Me qualification (IDE0009)
# These two rules define whether or not you prefer the use of this (C#) and Me. (Visual Basic) qualifiers.
dotnet_diagnostic.IDE0003.severity = warning

# - true - Prefer fields to be prefaced with this. in C# or Me. in Visual Basic
# - false - Prefer fields not to be prefaced with this. or Me.
# // dotnet_style_qualification_for_field = true
# this.capacity = 0;
# 
# // dotnet_style_qualification_for_field = false
# capacity = 0;
dotnet_style_qualification_for_field = false 

< other rules >

### CA ###
# Do not declare static members on generic types (CA1000)
# When a static member of a generic type is called, the type argument must be specified for the type.
dotnet_diagnostic.CA1000.severity = warning

Next steps:

  • Options for enabling/disabling IDE / CA formatting
  • Option for grouping CA by category

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions