StyleCop / StyleCop.ReSharper

Official ReSharper extension for StyleCop
163 stars 29 forks source link

Support for Switch Expressions #41

Closed Zumpel96 closed 3 years ago

Zumpel96 commented 3 years ago

If I use a switch expression, StyleCop Rule SA0102 gets triggered.

Example Code:

var value = myEnum switch
   {
      customEnum.ValueA => "A",
      customEnum.ValueB => "B",
         _ => "C",
   };

Please enable support for switch expressions.

matkoch commented 3 years ago

The extension uses the official StyleCop library, which doesn't receive any major development anymore (https://github.com/StyleCop/StyleCop). That also means that new language features aren't supported. I'm suggesting trying the StyleCop Analyzers.