audaciaconsulting / Audacia.CodeAnalysis

MIT License
1 stars 4 forks source link

MaxParameterCountAttribute cannot be used on classes with primary constructors #26

Closed jackpercy-acl closed 1 month ago

jackpercy-acl commented 7 months ago

The MaxParameterCountAttribute is only valid on AttributeTargets.Constructor | AttributeTargets.Method so cannot be applied to a class that has a primary constructor

image

image

The attribute should also support AttributeTargets.Class, assuming this is correctly picked up by the analyzer, increasing the max count allowed. If not, support for that will also need to be added.

jackpercy-acl commented 7 months ago

Have raised #169057 for this.