I decided to write custom lint checks for Android and I have a strong belief in Android Lint, so I don't want to use detekt or ktlint for checking code (they can't parse xml files, etc and I'd like to use a single tool).
But when I've read docs for Android Lint, I found that they have this new UAST and PSI (com.intellij.psi package) stuff, when detekt uses its child (kotlin only org.jetbrains.kotlin.psi).
I don't have java code in my project and I'd like to write kotlin specific lint rules.
I see, that com.android.tools.lint.detector.api.Detector has a method createPsiVisitor which returns JavaElementVisitor, and this JavaElementVisitor is subclass of com.intellij.psi.PsiElementVisitor. Is there any chance, that it's possible to use org.jetbrains.kotlin.psi.KtVisitor instead?
Or how can I write kotlin specific checks in Detector.UastScanner?
I want (for example) to write rules for
P.S. I succeeded in doing this in detekt, but I'd like to use default Android Lint.
[UPD]
I found com.android.tools.lint.checks.InteroperabilityDetector. Probably it's possible to write kinda KotlinVisitor (as JavaVisitor in this class). And this KotlinVisitor will be just wrapper around KtVisitor?