Open MarcusDenker opened 1 month ago
Imagine code like this:
tt ^ true ifTrue: [ self pageAt: 1 ] ifFalse: [ nil ]
We get " branch nil is useless" (ReNilBranchRule). Use auto-repair:
tt ^ true ifTrue: [ self pageAt: 1 ]
But now ReReturnsIfTrueRule complaints: "Returns value of ifTrue:/ifFalse: without ifTrue:ifFalse: block"
A solution would be for ReNilBranchRule to not complain when in a return
I agree with the proposed solution
Imagine code like this:
We get " branch nil is useless" (ReNilBranchRule). Use auto-repair:
But now ReReturnsIfTrueRule complaints: "Returns value of ifTrue:/ifFalse: without ifTrue:ifFalse: block"
A solution would be for ReNilBranchRule to not complain when in a return