a file with an excessive function count.", ) { private val threshold = 10 private var amount: Int = 0 override fun visitKtFile(file: KtFile) { super.visitKtFile(file) if (amount > threshold) { report(Finding(Entity.from(file), "Too many functions can make the maintainability of a file costlier")) } amount = 0 } override fun visitNamedFunction(function: KtNamedFunction) { super.visitNamedFunction(function) amount++ } } 12