thuytrinh
11/22/2019, 10:23 AMDuration type https://okkotlin.com/duration/ but it got flagged by the MagicNumber rule. Just wondering whether anyone knows how to configure the MagicNumber to exclude if I extract the whole Duration into a constant like below?
@ExperimentalTime
class Operation {
companion object {
val DEFAULT_TIMEOUT = 3.seconds
}
@ExperimentalTime
fun read(timeout: Duration = DEFAULT_TIMEOUT) {
}
}
So w/ that example, detekt still complains that 3 should be constant.schalkms
11/22/2019, 2:29 PMignoreConstantDeclaration to true ?