Detekt - State of the Union
summary
detekt is a community‑driven static analyzer for Kotlin that already ships 220 rules, including syntactic checks like magic number, semantic checks like unnecessary not‑null operator and double mutability for collections, and configurable forbidden method call lists. It runs as a CLI, Gradle plugin (producing many per‑variant tasks), IntelliJ plugin, outputs SARIF, and wraps KtLint integration for autocorrection. Type‑resolved rules use a binding context and currently require classpaths; work is underway to replace double compilation with a compiler plugin.
AI-written summary · about
chapters (18)
- 0:00Introduction and speaker intro
- 1:09What is Detekt and its popularity
- 2:54Detekt rule sets overview
- 5:03Example rules: unused private member and magic number
- 8:15Advanced rules: unnecessary not-null operator
- 10:03Double mutability for collections rule
- 11:30Forbidden method call rule
- 13:58Detekt ecosystem and integrations
- 15:25KTLint integration in Detekt
- 18:36Writing custom Detekt rules
- 21:32Detekt integrations: IntelliJ, SARIF, SonarQube
- 24:03Type resolution in Detekt
- 27:40Gradle plugin setup and tasks
- 30:56Detekt for Kotlin Multiplatform
- 31:17Upcoming features: ignore annotations and reports
- 34:31Future: Detekt compiler plugin
- 38:35Community and how to contribute
- 40:20Giveaway and closing remarks
related talks
37mStatic Code Analysis For Kotlin
22mKotlin on Code Quality Tools
42mSafe(r) Kotlin Code - Static Analysis Tools for Kotlin
45mTo Detekt 2.0, and beyond!
37mKotlin on Code Quality Tools
41mKotlin Static Analysis with Android Lint
47mHow we completely rewrote our static code analyzer for Kotlin
46mHow we completely rewrote our static code analyzer for Kotlin
