# detekt

> A static code analyzer for Kotlin

Source: https://talira.ai/catalog/detekt-d5bkj5sz
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Command-line tool, Library
- Categories: [developer tools / linting](https://talira.ai/categories/developer-tools/linting), [languages / kotlin](https://talira.ai/categories/languages/kotlin)
- Platforms: cli[^3]
- Licence: Apache-2.0[^2]
- Pricing: Free and open source[^2]
- Free tier: yes[^2]
- Backed by: [detekt team](https://talira.ai/orgs/detekt.md)

detekt is a static code analysis tool for Kotlin that finds code smells and complexity problems with configurable rule sets. It runs from the command line or through its own Gradle plugin, works on Android, JVM, JS, Native and Multiplatform projects, and writes reports in HTML, Markdown, SARIF and Checkstyle XML. A baseline file suppresses existing issues in a legacy codebase so only new ones fail the build, and teams can add custom rule sets and reports. It is open source under Apache-2.0 and developed by the community; 2.0 is in pre-release alongside the stable 1.x line.

## Links

- Website: https://detekt.dev/
- GitHub: https://github.com/detekt/detekt
- Docs: https://detekt.dev/docs/intro

## Ways to install

### Package managers

- [Homebrew](https://talira.ai/catalog/homebrew-djy17yn9.md): <https://formulae.brew.sh/formula/detekt>[^1]

## Problems it solves

- find code smells and overly complex functions in my Kotlin codebase
- fail my Gradle build when new Kotlin code breaks our style rules without fixing every old issue first
- upload Kotlin static analysis results to GitHub code scanning

## Features

- code smell and complexity analysis for Kotlin
- highly configurable rule sets
- baseline files to suppress existing issues in legacy projects
- suppress findings with @Suppress annotations
- HTML, Markdown, SARIF, Checkstyle XML and custom reports
- custom rule sets and report extensions
- first-party Gradle plugin and a command-line interface

## Trust

Overall: 0.70 out of 1.
Signals: maintenance 1.00, adoption 0.77, momentum 0.54, community 1.00, backing 0.30, extensibility 0.00.

- last commit yesterday
- 181 commits in the last 90 days
- latest release v1.23.8 21 months ago
- 7.1k GitHub stars
- 378 contributors
- accepts sponsorship (Github)
- 435 Homebrew installs in 30 days
- backed by detekt team

## Alternatives

- [SwiftLint](https://talira.ai/catalog/swiftlint-9xkk742n.md): Linter that enforces Swift style and conventions, with auto-fix
- [KubeLinter](https://talira.ai/catalog/kubelinter-ajb5n3q6.md): Static analysis for Kubernetes YAML files and Helm charts
- [PHPMD](https://talira.ai/catalog/phpmd-5bvh074k.md): PHP Mess Detector: finds bugs and code smells in PHP
- [ansible-lint](https://talira.ai/catalog/ansible-lint-r3bpcyc4.md): Checks playbooks for practices and behavior that could potentially be improved

## Sources

[^1]: https://formulae.brew.sh/api/formula.json (checked 27 Nov 2026)
[^2]: https://github.com/detekt/detekt/blob/main/LICENSE (checked 27 Nov 2026)
[^3]: https://github.com/detekt/detekt/blob/main/README.md (checked 27 Nov 2026)
