Reports methods with accessor-like names that have result type Unit
.
Methods that follow JavaBean naming contract for accessors are
expected to have no side effects. However,
methods with a result type of Unit
are only executed for their side effects.
This indicates that the method should either result in a non-Unit
type or
be renamed to better reflect the side effect.
Example:
trait Test {
def getTarget(): Unit
}
This inspection will not report methods that override other members.