Open TonyValenti opened 1 month ago
Diagnostic ID: CA1019: CA1019: Define accessors for attribute arguments
CA1019: Define accessors for attribute arguments
SDK: .NET 8.0 Version: .NET 8.0
<LangVersion>preview</LangVersion>
CA1019 looks for a property that matches the Name AND Type of the member. It should just look for the name and ignore the type.
[AttributeUsage(validOn: AttributeTargets.Class, AllowMultiple = true, Inherited = true)] public class DynamicallyIncludesAttribute : Attribute { public ImmutableArray<Type> Types { get; } public DynamicallyIncludesAttribute(params IEnumerable<Type> Types) { this.Types = [.. Types]; } }
CA1019 is not reported in the above code.
CA1019 is reported in the above code.
Analyzer
Diagnostic ID: CA1019:
CA1019: Define accessors for attribute arguments
Analyzer source
SDK: .NET 8.0 Version: .NET 8.0
<LangVersion>preview</LangVersion>
Describe the bug
CA1019 looks for a property that matches the Name AND Type of the member. It should just look for the name and ignore the type.
Steps To Reproduce
Expected behavior
CA1019 is not reported in the above code.
Actual behavior
CA1019 is reported in the above code.