detekt

What detekt is
detekt is a free static analyzer for Kotlin that helps developers identify code smells across Android, JVM, JS, Native, and Multiplatform projects. It runs on Linux, macOS, and Windows. Teams can configure rule sets, establish baselines for existing findings, and suppress individual results with @Suppress annotations. Reports are available in HTML, Markdown, SARIF, Checkstyle XML, or custom formats, and complexity reports can show lines of code, cyclomatic complexity, and code smell counts. The project provides a Gradle plugin and documents use with Gradle, Maven, and Bazel. Developers can extend it with custom rules using RuleSetProvider and ServiceLoader. Installation guidance covers Homebrew, Scoop, SDKMAN, and NixOS. Its Gradle plugin requires Gradle 6.8.3 or higher. The project also supports autofix, IDE use, and CI, with community discussion linked through Kotlin Slack and Stack Overflow.
Who it suits
detekt suits Kotlin developers who want configurable static analysis across multiple project types and build systems. It can also fit teams seeking custom rules, reports, or CI and IDE use.
What it does well
- Supports Android, JVM, JS, Native, and Multiplatform
- Configurable rules, baselines, and suppressions
- Offers HTML, Markdown, SARIF, and other reports
- Supports custom rules, autofix, IDEs, and CI
What to know first
- Gradle plugin requires Gradle 6.8.3 or higher
- Security patching focuses on the current minor version
Plans
| Plan | Billed and limits | Price |
|---|---|---|
| detekt | Open-source Kotlin static analysis tool; no commercial limits stated | Free |
As detekt.dev lists them, read 4 Oct 2026. The maker's own page has the final word.
Getting started
- Visit https://detekt.dev/.
- Choose a CLI installation route: Homebrew on macOS, Scoop on Windows, SDKMAN on Unix-like systems, or NixOS installation.
- For Gradle builds, use the detekt Gradle plugin and meet the Gradle 6.8.3 minimum.
- For other documented build routes, use Gradle, Maven, or Bazel.
Verdict
detekt offers configurable Kotlin analysis and several report formats, with options for extending its rules. Check the Gradle requirement if you plan to use its plugin.
Questions
How much does detekt cost?
The listed plan is free.
Is there a free plan or trial?
A free plan is available. There is no free trial.
Which platforms does detekt support?
It runs on Linux, macOS, and Windows, and supports Android, JVM, JavaScript, Native, and Multiplatform projects.
Can teams add custom rules?
Yes. Developers can add custom rule sets through detekt's RuleSetProvider and ServiceLoader pattern.
Which build tools are documented?
The project provides a Gradle plugin and documents use with Gradle, Maven, and Bazel.
Facts from detekt's own pages
- Build integrations
- The project provides a Gradle plugin and documents use with Gradle, Maven, and Bazel builds. · detekt.dev, 4 Oct 2026
- CLI downloads
- The CLI installation guide documents Homebrew on macOS, Scoop on Windows, SDKMAN on Unix-like systems, and NixOS installation. · detekt.dev, 4 Oct 2026
- Community integrations
- The project marketplace lists community-built rules, extensions, and plugins, including a GitLab Code Quality reporter and ktlint rule wrappers. · detekt.dev, 4 Oct 2026
- Community support
- The project site links to Kotlin Slack and Stack Overflow for community discussion. · detekt.dev, 4 Oct 2026
- Complexity reports
- detekt can report lines of code, cyclomatic complexity, and code smell counts. · detekt.dev, 4 Oct 2026
- Extensibility
- Developers can add custom rule sets using detekt's RuleSetProvider and ServiceLoader pattern. · detekt.dev, 4 Oct 2026
- Gradle requirement
- The Gradle plugin guide states that detekt requires Gradle 6.8.3 or higher. · detekt.dev, 4 Oct 2026
- Project types
- The site says detekt supports Android, JVM, JS, Native, and Multiplatform projects. · detekt.dev, 4 Oct 2026
- Purpose
- detekt is a static code analyzer for Kotlin that helps identify code smells. · detekt.dev, 4 Oct 2026
- Reports
- Supported report formats include HTML, Markdown, SARIF, Checkstyle XML, and custom reports. · detekt.dev, 4 Oct 2026
- Rules
- Users can configure rule sets, generate baselines for existing issues, and suppress findings with @Suppress annotations. · detekt.dev, 4 Oct 2026
- Security support
- The security policy says patches are applied up to the current minor version and earlier versions are considered case by case. · github.com, 4 Oct 2026
- Vulnerability reporting
- The security policy asks reporters to email [email protected] and says the team commits to respond within two weeks. · github.com, 4 Oct 2026
Where detekt stands on Freedom251
- Linters#11 of 33
