VSDiagnostics icon indicating copy to clipboard operation
VSDiagnostics copied to clipboard

Implement MutableStruct analyzer

Open Vannevelj opened this issue 9 years ago • 3 comments

We already have a diagnostic that warns you when you're re-assigning this inside a struct. Now, let's add a diagnostic that warns you whenever you try to assign a field or property in a struct outside of the constructor.

Vannevelj avatar Nov 10 '15 12:11 Vannevelj

This is a good one. Easy to get wrong if you're not paying attention.

rubberduck203 avatar Jan 29 '16 01:01 rubberduck203

Additionally: also warn when the struct has a class member (field/property) that is mutable. This means we'll have to look through that class' structure and determine if it's mutable or not. This will also help #559

Vannevelj avatar May 03 '16 15:05 Vannevelj

Additionally: warn when the struct has public/internal fields or properties with a setter (read-only properties are excluded of course).

Vannevelj avatar May 03 '16 15:05 Vannevelj