dotnet / roslynator

Roslynator is a set of code analysis tools for C#, powered by Roslyn.

Home Page:https://josefpihrt.github.io/docs/roslynator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Consider disabling `RCS1223` for attributes

RenderMichael opened this issue · comments

Product and Version Used:
Roslynator.Analyzers nuget package, version 4.10.0

Steps to Reproduce:

  1. Enable RCS1223
public sealed class MyAttribute : System.Attribute;

Actual Behavior:
Diagnostic RCS1223 is fired.

Expected Behavior:
Consider changing the expected behavior to no analyzer firing here.

Please be more specific on why this case should be suppressed, I see nothing special here. Thanks.

My initial thought was that attributes are supposed to be "dummy" data which don't do anything besides contain the data from its constructor.

Reconsidering, it may still be useful to have a debugger display on such a type.

If y'all also agree that attributes shouldn't be treated any differently, I'll close this issue off. Thanks for your time!