Detekt: ForbiddenVoid should have an ignoreOverriddenFunctions setting

Created on 30 Mar 2019  路  1Comment  路  Source: detekt/detekt

Expected Behavior of the rule

If I set ForbiddenVoid to true, whenever I encounter an overridden function I eventually cannot change it (or I don't know how to do it) because the Unit type is actually _different_ from Void.

Context

I'm trying to activate the rule and use it :sunglasses:

For instance, projects like Vert.x where you must extend from AbstractVerticle and usually/potentially override start and stop, have the type startFuture: Future<Void> and I don't have a way to exclude those.

help wanted improvement rules

Most helpful comment

Maybe a new config option called ignoreOverridden does the trick here.

>All comments

Maybe a new config option called ignoreOverridden does the trick here.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jcornaz picture jcornaz  路  3Comments

zmunm picture zmunm  路  3Comments

sewerk picture sewerk  路  3Comments

nipafx picture nipafx  路  4Comments

serj-lotutovici picture serj-lotutovici  路  3Comments