HealthCatalyst / Fabric.SharedSettings

Resharper plugin for settings that we can share across the HealthCatalyst organization.
0 stars 4 forks source link

Should we disable CA1024: Use Properties Where Appropriate? #6

Closed j2jensen closed 6 years ago

j2jensen commented 7 years ago

CA1024 appears when:

A public or protected method has a name that starts with Get, takes no parameters, and returns a value that is not an array.

The thing is, even the documentation for this rule admits that there are a lot of situations where you wouldn't want to change a method following this pattern into a property.

This rule thinks it's encouraging developers to choose the right paradigm when they might have defaulted to using the wrong one, but I think it's more likely to cause developers to switch to using a property when it's not really appropriate (because it's easier to tell Resharper to change it than it is to write up a justification). This is likely to cause more costly refactoring down the line.

Thoughts?

j2jensen commented 6 years ago

Working on this in #22