Thanks to visit codestin.com
Credit goes to github.com

Skip to content

RCS1264 roslynator_use_var = never string.Empty should be applied #1603

@nemu69

Description

@nemu69

Product and Version Used:

NuGet package v. 4.12.4

Steps to Reproduce:

in .editorconfig

roslynator_use_var = never

Code:

internal class Demo
{
  public static void StringEmptyDemo()
  {
    var toto = string.Empty; // <--- Should trigger an error here
  }
}

Actual Behavior:
No error is raised.

Expected Behavior:
Suggest RCS1264.

Temporary solution
Use dotnet_diagnostic.rcs1008.severity = error

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions