How we completely rewrote our static code analyzer for Kotlin
summary
A complete rewrite replaces the old Slang intermediate with Kotlin’s native tree and Kotlin compiler semantics so rules use the compiler’s binding context instead of text heuristics; rule count rises from 40 to 108 rules, security and regex checks appear, and external linters stay supported. Initial issues include a slow PSI-based implementation and an expensive mistake of building binding contexts per file causing OOMs; caching the context once cuts analysis from minutes or hours down to about 250 ms on SonarCloud and resolves most performance complaints.
AI-written summary · about
chapters (6)
- 0:00Start
- 13:52Kotlin AST variants
- 24:56BindingContext Slices
- 30:36Problems
- 38:50Achievements
- 39:33Takeaways
related talks
46mHow we completely rewrote our static code analyzer for Kotlin
38mStatic Kotlin bug hunting
43mStatic Kotlin Bug Hunting
41mKotlin Static Analysis with Android Lint
37mStatic Code Analysis For Kotlin
45mComputer Says No - Static Analysis and CI in a Kotlin Word
47mComputer Says No — Static analysis and CI in a Kotlin world
41mDetekt - State of the Union
