question about the `InjectDispatcher` rule, should...
# detekt
j
question about the
InjectDispatcher
rule, should the following violate it:
Copy code
class MyRepository(val dispatcher: CoroutineDispatcher) {
    @Inject // mark this constructor as the one used by guice at runtime, tests can still inject a TestDispatcher using the primary constructor
    constructor() : this(<http://Dispatchers.IO|Dispatchers.IO>)
}
This is basically equivalent to
class MyRepository(dispatcher: CoroutineDispatcher = <http://Dispatchers.IO|Dispatchers.IO>)
but still triggers the detekt rule. Or am I missing a difference?
c
I don’t think secondary constructor was previously considered. Please feel free to open an issue on Github and contribute if possible 🙏