Closed ebgraham closed 2 years ago
I concur, as this just bit us today. Is there a way to block individual rules from autocorrection?
I agree. We ran into the same problem.
I think the rule triggers on the property being named delegate
. In a perfect world where all properties are named correctly, this autocorrection might work. But in case some property is called delegate
without actually being a delegate that needs to be weak, this causes errors.
Any movement on this? Right now we are forced to just disable this rule due to the fact that it is in the autocorrect list which is not ideal.
New Issue Checklist
Describe the bug
The weak_delegate rule is unique in that it actually changes the behavior of the code by autocorrecting
weak
to delegates. It would be unsafe to apply this rule to a codebase as objects may now released that had previously been retained, leading to undefined behavior and bugs.This rule is still useful as a warning to developers, but autocorrect should be disabled.