On this page
Overview
detekt is a static code analysis tool for Kotlin. It provides configurable rule sets, baselines, source-level suppression, HTML/Markdown/SARIF/Checkstyle reports, and custom extensions, with both CLI and Gradle-plugin workflows for continuous code-quality checks.
Features and best fit
Based on official documentation; not hands-on tested · Content checked:
Key features
Analyze Kotlin code with configurable rule sets
Rule sets cover complexity, style, naming, exceptions, and other code-smell categories so problematic patterns can be detected without executing the application.
Sources: [1]
Use baselines and Suppress annotations for incremental adoption
A baseline can suppress existing findings so CI focuses on newly introduced issues, while source files can use @Suppress for targeted exceptions.
Sources: [1]
Best fit
Fits Kotlin teams introducing code-quality gates incrementally
Legacy codebases can start with a baseline, block new violations, and then tighten rule configuration over time instead of requiring an immediate full cleanup.
Sources: [1]
Before adoption
Do not confuse stable 1.23.8 with the 2.0 alpha line
GitHub still lists 1.23.8 as the latest stable release, while 2.0.0-alpha.6 was published in August 2026. Alpha.6 is built against Kotlin 2.4.10, Gradle 9.6.1, and AGP 9.3.1, so evaluate it separately from production upgrades.
Align stable 1.23.8 compatibility with the existing project toolchain
The 1.23.8 README documents Kotlin 2.0.21, Gradle 8.12.1, AGP 8.8.1, and compatibility through JDK 21. Gradle and Android projects should review plugin and toolchain versions together.
Treat the baseline as debt to reduce rather than a permanent allowlist
Baselines help legacy adoption, but leaving every old finding suppressed indefinitely stalls improvement. Review baseline diffs during rule changes and major upgrades and remove resolved entries.
Sources: [1]
Official sources
- [1]detekt 1.23.8 README(2026-10-04)
- [2]detekt 1.23.8 CLI documentation(2026-10-04)
- [3]detekt 1.23.8 stable release(2026-10-04)
- [4]detekt 2.0.0-alpha.6 README(2026-10-04)
- [5]detekt 2.0.0-alpha.6 release(2026-10-04)
- [6]detekt Apache-2.0 license(2026-10-04)
Supplemental curator note
For production adoption, stable 1.23.8 is the clearer baseline while active development has moved into the 2.0 alpha series. Version 2.0.0-alpha.6 is an alpha built against Kotlin 2.4.10 and Gradle 9.6.1, so treat stable upgrades and alpha migration experiments as separate workstreams.
Try it in 3 steps
- 1
Download the stable detekt 1.23.8 CLI JAR
Pin latest stable 1.23.8 as the production baseline and evaluate 2.0.0-alpha.6 separately.
curl -sSLO https://github.com/detekt/detekt/releases/download/v1.23.8/detekt-cli-1.23.8-all.jar - 2
Review CLI options and exit-code behavior
Inspect input, configuration, baseline, and report options. Findings at or above the configured threshold produce a non-zero CI-oriented exit code.
java -jar detekt-cli-1.23.8-all.jar --help - 3
Scan a minimal Kotlin file
Validate the CLI with a minimal scan before adding the Gradle plugin, project rules, or a baseline.
printf 'fun main() { println("detekt") }\n' > Sample.kt && java -jar detekt-cli-1.23.8-all.jar --input Sample.kt
Growth
Growth trends · Last 30 days
7,080 Stars
Trend data is still being collected.
Development activity
Last 90 days · weekly
- Commits (last 30 days)
- 55
- Open PRs
- 32
Development activity is still being collected.
Built with
Categories and tags
Categories
GitHub data
GitHub dataView detailed GitHub data
GitHub Topics
- static
- analysis
- kotlin
- codesmells
- linter
- gradle-plugin
- static-analysis
- lint
- code-quality
- hacktoberfest
- Stars
- 7,080
- Forks
- 874
- Watchers
- 56
- Open issues
- 157
- Contributors
- 335
- Owner type
- Organization
- Primary language
- Kotlin
- License
- Apache-2.0
- Repository last updated
- Oct 3, 2026
Related information
Write a related articleShare a guide or use case for this OSS in Markdown. Articles are published after administrator approval.
Explore next
- ESLint27,531 Stars
2 shared tag(s) · 1 shared category(s)
Use AST analysis and pluggable rules to turn JavaScript quality checks into repository policy through flat config
JavaScript - Kotlin53,470 Stars
2 shared tag(s) · Same language
keep Java interoperability while extending one language from JVM to Android, iOS, desktop, and web
Kotlin - OkHttp47,081 Stars
2 shared tag(s) · Same language
centralize HTTP, TLS, connection reuse, caching, and DNS for Android/JVM applications
Kotlin - Biome25,895 Stars
1 shared tag(s) · 2 shared category(s)
combine formatting, linting, fixes, and editor diagnostics in one fast tool
Rust - Coil11,912 Stars
1 shared tag(s) · 1 shared category(s) · Same language
load images in Android and Compose Multiplatform with Kotlin Coroutines while integrating caching, resizing, and request lifecycle handling
Kotlin - Koin10,022 Stars
1 shared tag(s) · 1 shared category(s) · Same language
configure lightweight dependency injection for Kotlin, Android, and Kotlin Multiplatform through concise module DSLs
Kotlin
Report incorrect information
Tell us if any listing information is incorrect or outdated.