Joe
03/19/2021, 8:01 PMMemberNameEqualsClassName
rule. Is inline factory functions a known issue with this rule (or am I perhaps doing something else wrong that's making it trigger)?Brais Gabin
03/19/2021, 9:21 PMJoe
03/19/2021, 11:22 PMdata class FieldInfo<T>(
val alias: String,
val extractor: (String) -> T
) {
companion object {
// this complains about MemberNameEqualsClassName
inline fun <reified T> fieldInfo(
alias: String,
noinline extractor: (String) -> T
): FieldInfo<T> {
return FieldInfo(alias, extractor)
}
}
}
Brais Gabin
03/20/2021, 12:23 AMMemberNameEqualsClassName
flags it. I don't know what's the reason behind this rule but it flags your code correctly. If you don't agree with the rule you can disable it or if you agree with it you should rename the function.Joe
03/20/2021, 5:20 AMBrais Gabin
03/22/2021, 10:52 AMJoe
03/22/2021, 3:48 PM