I want to write a Detekt rule which disallows usage of implicit "it" variable in a multi-line lambda. I've written method override fun visitLambdaExpression(lambdaExpression: KtLambdaExpression) but I don't know how
- Check if the lambda contains 'it' variable.
lambdaExpression.valueParameterscontains nothing in that case. - Check if 'it' is used in the lambda.
And I've not found any documentation.
Try this
And the test: