roslynator icon indicating copy to clipboard operation
roslynator copied to clipboard

RCS1016 .editorconfig

Open silvioboehme opened this issue 4 years ago • 5 comments

Product and Version Used: VS2019 (16.6.1) <PackageReference Include="Roslynator.Analyzers" Version="2.3.0">

I have found a strange behavior. If i configure the analyzers in a ruleset file and set RCS1016 to "warning", VS2019 (16.6.1) shows this correcty as a warning for a simple one line method and provides the right fix.

If i configure the analyzers in .editorconfig and set RCS1016 to "warning", nothing happens. Other analyzers are enabled in the right way, and also the severity seems to be right.

Except for RCS1016.

silvioboehme avatar Jun 09 '20 15:06 silvioboehme

I will look at it.

It is important to mention that Roslynator does not interact with .editorconfig but it uses Roslyn API that allows to obtain effective severity for each analyzer. Which implies that theoretically it could be bug in Roslyn.

josefpihrt avatar Jun 09 '20 16:06 josefpihrt

I also found a problem trying to disable a fade out analyzer through editorconfig. That is not working and the fading is still visible:

dotnet_diagnostic.RCS1058.severity = none dotnet_diagnostic.RCS1058FadeOut.severity = none

caiolmd avatar Aug 24 '20 08:08 caiolmd

@caiolmd "FadeOut" analyzers are marked with NotConfigurable tag which mean that they "cannot be suppressed or filtered or have its severity changed".

Are you trying to use RCS1058 without "fade out" effect? If that is the case then that is not possible.

josefpihrt avatar Aug 24 '20 15:08 josefpihrt

Are you trying to use RCS1058 without "fade out" effect? If that is the case then that is not possible.

@JosefPihrt No, I'm trying to disable RCS1058, which I did, but the "fade out" is still there. RCS1058 is disable but RCS1058FadeOut is not. I'm on VSCode with Omnisharp.

image

caiolmd avatar Aug 24 '20 23:08 caiolmd

Hey, I have experienced a similar fade out issue - when disabling the analyzer the fade out is still applied:

image

image

But only for the switch statement, if behaves differently:

image

hntrewhitt avatar Mar 03 '21 16:03 hntrewhitt