Conversation
20ccf36 to
93a6039
Compare
|
Matching on mere syntactical likeness seems very fragile. I doubt whether this can be implemented satisfactorily without at least a little bit of semantic analysis (top level visitor). The detection rate of this rule implementation is very low. Signatures with little alterations such as different names, type restrictions, default values, etc. are very likely in real code bases, but the rule doesn't detect them. I'm concerned that the rule is misleading because I expect it has an utterly poor detection rate. |
That would at least help with issues like the one mentioned by the OP or crystal-lang/crystal#16366.
That's intentional, since I was thinking more of cases like the ones mentioned, for which this implementation should be sufficient - like copy-paste errors and simple mistakes, whereas a more complicated implementation would need to leverage semantic analysis to be fully useful.
Yeah, that might be a wrong expectation given by the rule name. |
|
|
93a6039 to
51adf9c
Compare
Lint/DuplicateMethodDefinition ruleLint/DuplicateMethodSignature rule
|
@nobodywasishere Thanks! I've used your naming suggestion 🙏 I think this PR is ready for CR now. |
Resolves #658