scapegoat
scapegoat copied to clipboard
False Positive: EmptyMethod
Of course scapegoat is correct for the below example, but IMHO it should not report this if the method is implementing a Unit function.
abstract class Thing {
def method(): Unit
}
class DoNoThing extends Thing {
// EmptyMethod: below code gives a warning that cannot be helped
def method(): Unit = ()
}
Not thinking about it too much, but I guess it's more about the super class being abstract, not that the return type is Unit.