CheckOps
detekt
detekt is an Apache-2.0 static code analysis tool for Kotlin that reports code smells, complexity and style issues, with a Gradle plugin, baselines and custom rules.
Latest public signals
Not refreshed yet. Refresh reads the public site and, when the entry has a GitHub repository, the latest release.
Introduction
detekt is a static code analysis tool for Kotlin. It finds code smells, complexity hot spots, potential bugs, naming issues and style problems, and can wrap ktlint rules for formatting.
Rule sets are configurable in YAML, a baseline file suppresses existing issues during adoption, and type resolution enables deeper checks. The Gradle plugin, CLI and IDE plugin cover most workflows, and reports include HTML, XML, SARIF and Markdown. Custom rule sets can be written in Kotlin.
In the quality loop detekt is the main static gate for Kotlin projects.
The source code is at detekt/detekt on GitHub under the Apache-2.0 licence, with about 7,100 stars; the most recent commit was on 11 November 2026.
Features
- Code smell rules: Complexity, naming, style and potential bugs.
- Baselines: Adopt on existing code.
- Type resolution: Deeper analysis with type info.
- Formatting: Wraps ktlint rules.
- Reports: HTML, XML, SARIF, Markdown.
- Custom rules: Kotlin rule sets.
Pros
- Kotlin-native: Built for Kotlin idioms.
- Free to use: Open source under the Apache-2.0 licence, so the core tool costs nothing to use.
- Actively maintained: The repository had commits as recent as 11 November 2026.
- Community: About 7,100 GitHub stars.
Cons
- 2.0 transition: Major version changes affect configuration.
- Type resolution setup: Extra configuration for best results.
- Noise: Complexity rules may need tuning.
Usage and Links (Example)
plugins { id("io.gitlab.arturbosch.detekt") version "1.23.8" }
./gradlew detekt detektBaseline
Resources:
Pricing
detekt is free and open source under the Apache-2.0 licence.
Recommended for?
- Kotlin JVM and Android teams.
- Projects tracking complexity and smells.
Conclusion
detekt is the standard static analyser for Kotlin.
Generate a baseline and tighten rules over time.
On CheckOps, detekt is filed under the Release & CI gates stage. Related tools listed here include Kover, Kotest, MockK, SonarQube, PMD and Error Prone. A short trial on a real project, with your own code, data and pipeline, is usually the fastest way to choose between them, because fit matters more than feature lists. Facts here come from the official site, documentation and repository, checked on 11 November 2026.
Alternatives
Other tools on CheckOps that cover similar ground. Open a page, or compare one with detekt side by side.
KKoverKover is an Apache-2.0 code coverage toolset from JetBrains for Kotlin projects, with a Gradle plugin for coverage reports, verification rules and Android variant support.Compare with detekt
KKotestKotest is an Apache-2.0 Kotlin multiplatform test framework with multiple testing styles, a large assertions library and built-in property-based testing.Compare with detekt
MMockKMockK is an Apache-2.0 mocking library built for Kotlin, supporting final classes, objects, coroutines, extension functions and top-level functions with a concise DSL.Compare with detekt
SSonarQubeModernize your AI workflows with code verification for the agentic era.Compare with detekt
PPMDPMD is an extensible, BSD-style licensed multi-language static code analyser for Java, Apex, Kotlin, JavaScript and more, with a copy-paste detector (CPD).Compare with detekt
EError ProneError Prone is an Apache-2.0 static analysis tool from Google that hooks into the Java compiler to catch common mistakes as compile-time errors, with suggested fixes.Compare with detekt