
detekt
detekt is a free static analyzer for Kotlin that helps identify code smells across Android, JVM, JS, Native, and Multiplatform projects.
What detekt is
detekt is a free static analyzer for Kotlin that helps identify code smells across Android, JVM, JS, Native, and Multiplatform projects. Developers can configure rule sets, create baselines for existing issues, and suppress findings with @Suppress annotations. Reports can be generated as HTML, Markdown, SARIF, Checkstyle XML, or custom formats; complexity reports can include lines of code, cyclomatic complexity, and code smell counts. The project provides a Gradle plugin and documents use with Gradle, Maven, and Bazel builds. Custom rule sets can be added through its RuleSetProvider and ServiceLoader pattern. The project marketplace also lists community rules, extensions, and plugins, including a GitLab Code Quality reporter and ktlint rule wrappers. CLI installation guidance covers Homebrew on macOS, Scoop on Windows, SDKMAN on Unix-like systems, and NixOS. The Gradle plugin requires Gradle 6.8.3 or higher. detekt is free, with no commercial limits stated; it also supports autofix, IDE use, and CI.
Good
- Supports Android, JVM, JS, Native, and Multiplatform projects.
- Offers multiple report formats, including SARIF and HTML.
- Custom rule sets can be added.
- Documents Gradle, Maven, and Bazel build use.
- Free, with no commercial limits stated.
Watch out
- Gradle plugin requires Gradle 6.8.3 or higher.
- Security patches cover the current minor version; earlier versions are case by case.
Who it suits
detekt suits Kotlin developers who want configurable code-smell analysis in builds or CI. Its reports, baselines, and custom-rule support may also suit teams with established codebases or specific analysis needs.
Verdict
detekt provides Kotlin analysis with configurable rules, several report formats, and integrations across documented build tools. Check the Gradle requirement and security policy when selecting a version.
Plans and prices
From detekt's own pricing page, checked 4 Oct 2026.
| Plan | Price | What it gives you |
|---|---|---|
| detekt | Free | Open-source Kotlin static analysis tool; no commercial limits stated |
The facts
Each one read from detekt's own pages, with the date it was checked.
What it does
- Build integrations
- The project provides a Gradle plugin and documents use with Gradle, Maven, and Bazel builds.checked 4 Oct 2026
- CLI downloads
- The CLI installation guide documents Homebrew on macOS, Scoop on Windows, SDKMAN on Unix-like systems, and NixOS installation.checked 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.checked 4 Oct 2026
- Community support
- The project site links to Kotlin Slack and Stack Overflow for community discussion.checked 4 Oct 2026
- Complexity reports
- detekt can report lines of code, cyclomatic complexity, and code smell counts.checked 4 Oct 2026
- Extensibility
- Developers can add custom rule sets using detekt's RuleSetProvider and ServiceLoader pattern.checked 4 Oct 2026
- Gradle requirement
- The Gradle plugin guide states that detekt requires Gradle 6.8.3 or higher.checked 4 Oct 2026
- Project types
- The site says detekt supports Android, JVM, JS, Native, and Multiplatform projects.checked 4 Oct 2026
- Purpose
- detekt is a static code analyzer for Kotlin that helps identify code smells.checked 4 Oct 2026
- Reports
- Supported report formats include HTML, Markdown, SARIF, Checkstyle XML, and custom reports.checked 4 Oct 2026
- Rules
- Users can configure rule sets, generate baselines for existing issues, and suppress findings with @Suppress annotations.checked 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.checked 4 Oct 2026
- Vulnerability reporting
- The security policy asks reporters to email [email protected] and says the team commits to respond within two weeks.checked 4 Oct 2026
Alternatives to detekt
- 1

Cppcheck
Free planOpen sourceLinuxmacOSSelf-hostedWindows7.4Free plan - 2
JSHint
Free planOpen sourceWebAPIExtensionLinux7.4Free plan - 3
Flake8
Free planOpen sourceAPILinuxmacOSSelf-hosted7.3Free plan - 4
PMD
Free planLinuxmacOSSelf-hostedWindows6.8Free plan - 5
SwiftLint
Free planLinuxmacOSWindows6.6Free plan - 6

Ruff
Free planWebLinuxmacOSSelf-hosted6.5Free plan
