# detekt/detekt

Static code analysis for Kotlin

Repository: https://github.com/detekt/detekt
Canonical: https://ross.abutalabs.com/products/detekt
Homepage: https://detekt.dev
Language: MDX
License: Apache-2.0
License Family: permissive
Topics: static, analysis, kotlin, codesmells, linter, gradle-plugin, static-analysis, lint, code-quality, hacktoberfest
Last push: 2026-08-26T22:14:46+00:00

## Health v2 (maintenance only)
Score: 70/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 16, longevity 100
- inputs: {"age_days": 3601, "days_push": 7, "days_rel": 558, "gap_med": 165, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 7034, forks 868 (observed 2026-08-28T04:09:55.108751+00:00)

## What it is
detekt is a static code analysis tool for the Kotlin programming language that detects code smells and enforces configurable rule sets. It ships as a CLI, a first-party Gradle plugin, and an extensible rule engine with report output in HTML, Markdown, SARIF, and Checkstyle XML.

## Use cases
- lint kotlin code in a gradle project
- find code smells in my kotlin codebase
- enforce code quality rules in ci for kotlin
- generate a baseline of existing issues for a legacy kotlin project
- write custom static analysis rules for kotlin
- produce sarif reports for code scanning
- measure cyclomatic complexity of kotlin code

## When to choose
- you have a Kotlin JVM, Android, Multiplatform, JS, or Native project and want automated code quality checks
- you need configurable lint rules with baselines and suppression support
- you want CI-friendly reports in SARIF, HTML, Markdown, or Checkstyle formats

## When to avoid
- your codebase is not Kotlin (use language-specific linters like ESLint, Pylint, or Clippy)
- you need full type-aware IDE inspections only - IntelliJ's built-in inspections may suffice
- you need runtime bug detection or dynamic analysis rather than static analysis

## Facets
- artifact type: cli-tool
- maturity: active
- function: linter, developer-tools, code-review, build-tool
- domain: developer-tools, programming-languages, testing
- platform: jvm, cli, cross-platform
- tags: kotlin, static-analysis, code-smells, gradle-plugin, code-quality, sarif

## Member repositories
- detekt/detekt (main) score 70

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:55.108751+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:40:34.301341+00:00, confidence not recorded.
  - readme: https://github.com/detekt/detekt (fetched 2026-08-28T04:09:55.108751+00:00, sha 561df3f69475)
  - homepage: https://detekt.dev (fetched 2026-08-29T08:36:46.533386+00:00, sha cbea21402cd8)
  - site_page: https://detekt.dev/docs/intro (fetched 2026-08-29T08:36:46.542481+00:00, sha 4128ebee2ace)
  - site_page: https://detekt.dev/docs/next/intro (fetched 2026-08-29T08:36:46.544435+00:00, sha 76a24f3d8e1a)
  - site_page: https://detekt.dev/docs/2.0.0-alpha.5/intro (fetched 2026-08-29T08:36:46.546011+00:00, sha cb5ff156216c)
  - site_page: https://detekt.dev/docs/2.0.0-alpha.4/intro (fetched 2026-08-29T08:36:46.547601+00:00, sha 20c5299df802)
  - site_page: https://detekt.dev/docs/2.0.0-alpha.3/intro (fetched 2026-08-29T08:36:46.549081+00:00, sha 0c94c77d23fd)
  - site_page: https://detekt.dev/docs/2.0.0-alpha.2/intro (fetched 2026-08-29T08:36:46.550556+00:00, sha 2b9f98a5fc09)
  - site_page: https://detekt.dev/docs/2.0.0-alpha.1/intro (fetched 2026-08-29T08:36:46.552048+00:00, sha a4b00005f7a3)
  - site_page: https://detekt.dev/docs/2.0.0-alpha.0/intro (fetched 2026-08-29T08:36:46.553478+00:00, sha bc972c6a6ad8)
- Data as of 2026-08-30T08:39:29.467469+00:00.
