in rules/common/src/main/kotlin/com/twitter/compose/rules/ComposeUnstableCollections.kt [14:25]
override fun visitComposable(function: KtFunction, autoCorrect: Boolean, emitter: Emitter) {
for (param in function.valueParameters.filter { it.isTypeUnstableCollection }) {
val variableName = param.nameAsSafeName.asString()
val type = param.typeReference?.text ?: "List/Set/Map"
val message = createErrorMessage(
type = type,
rawType = type.replace(DiamondRegex, ""),
variable = variableName,
)
emitter.report(param.typeReference ?: param, message)
}
}