Lint works on UAST - yes. I’d rewrite the detekt r...
# detekt
v
Lint works on UAST - yes. I’d rewrite the detekt rules to leverage UAST. We get so many things for free. Gradle Integration / Baseline / nice HTML reports / XML reports / quickfixes / IDE integration / inspection of any file type and so many more things Additionally, Lint does work on Kotlin only projects - https://github.com/vanniktech/kotlin-on-code-quality-tools/tree/master/custom-android-lint-rules - they have their own plugin for that which can be applied to kotlin/java only modules and the same lint rules can be used
s
re: using Lint in non-Android projects… I didn’t know that. It’s cool! But what about all the built-in rules that only apply to Android projects? Isn’t that a massive waste of time to run those? Would we have to provide a lint.xml that disables all the rules?
v
Android specific rules are not running when applying the plugin for Kotlin/Java
👍 1
Most of the time spent when running lint is compiling code + mapping + type resolution
s
True, as long as you’re not running multi-pass rules (e.g., rules who require checking multiple files and/or both code and bytecode/resources/…)
v
Even those are fast because the cost is paid upfront
s
Ah, must have changed since I last checked (2.x days)
Used to be run multiple times 😛