[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-7219":3},{"id":4,"name":5,"fullName":6,"owner":5,"repo":5,"description":7,"homepage":8,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":19,"compositeScore":20,"rankGlobal":9,"rankLanguage":9,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":22,"hasPages":24,"topics":25,"createdAt":9,"pushedAt":9,"updatedAt":36,"readmeContent":37,"aiSummary":38,"trendingCount":15,"starSnapshotCount":15,"syncStatus":39,"lastSyncTime":40,"discoverSource":41},7219,"detekt","detekt\u002Fdetekt","Static code analysis for Kotlin","https:\u002F\u002Fdetekt.dev",null,"Kotlin",6964,838,54,183,0,1,4,29,5,71.67,"Apache License 2.0",false,"main",true,[26,27,28,29,30,31,32,33,34,35],"analysis","code-quality","codesmells","gradle-plugin","hacktoberfest","kotlin","lint","linter","static","static-analysis","2026-06-12 04:00:32","# detekt\n\n[![Join the chat at #detekt on KotlinLang](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%23detekt-on_slack-red.svg?logo=slack)](https:\u002F\u002Fkotlinlang.slack.com\u002Farchives\u002FC88E12QH4)\n[![Visit the website at detekt.dev\u002F](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fvisit-website-red.svg?logo=firefox)](https:\u002F\u002Fdetekt.dev\u002F)\n[![Maven Central](https:\u002F\u002Fimg.shields.io\u002Fmaven-central\u002Fv\u002Fio.gitlab.arturbosch.detekt\u002Fdetekt-cli?label=MavenCentral&logo=apache-maven)](https:\u002F\u002Fsearch.maven.org\u002Fartifact\u002Fio.gitlab.arturbosch.detekt\u002Fdetekt-cli)\n[![Gradle Plugin](https:\u002F\u002Fimg.shields.io\u002Fmaven-central\u002Fv\u002Fio.gitlab.arturbosch.detekt\u002Fdetekt-gradle-plugin?label=Gradle&logo=gradle)](https:\u002F\u002Fplugins.gradle.org\u002Fplugin\u002Fio.gitlab.arturbosch.detekt)\n[![Revved up by Develocity](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FRevved%20up%20by-Develocity-06A0CE?logo=Gradle&labelColor=02303A)](https:\u002F\u002Fge.detekt.dev\u002Fscans)\n[![License](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fdetekt\u002Fdetekt.svg)](LICENSE)\n\n![Pre Merge Checks](https:\u002F\u002Fgithub.com\u002Fdetekt\u002Fdetekt\u002Fworkflows\u002FPre%20Merge%20Checks\u002Fbadge.svg?branch=main)\n[![Codecov](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fdetekt\u002Fdetekt\u002Fbranch\u002Fmain\u002Fgraph\u002Fbadge.svg)](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fdetekt\u002Fdetekt)\n[![Awesome Kotlin Badge](https:\u002F\u002Fkotlin.link\u002Fawesome-kotlin.svg)](https:\u002F\u002Fgithub.com\u002FKotlinBy\u002Fawesome-kotlin)\n[![FOSSA Status](https:\u002F\u002Fapp.fossa.com\u002Fapi\u002Fprojects\u002Fcustom%2B25591%2Fgithub.com%2Fdetekt%2Fdetekt.svg?type=small)](https:\u002F\u002Fapp.fossa.com\u002Fprojects\u002Fcustom%2B25591%2Fgithub.com%2Fdetekt%2Fdetekt?ref=badge_small)\n\nMeet _detekt_, a static code analysis tool for the [_Kotlin_ programming language](https:\u002F\u002Fkotlinlang.org\u002F).\nVisit [the project website](https:\u002F\u002Fdetekt.dev\u002F) for installation guides, rule descriptions, configuration options and more.\n\n![detekt in action](website\u002Fstatic\u002Fimg\u002Ftutorial\u002Fdetekt_in_action.png \"detekt in action\")\n\n### Features\n\n- Code smell analysis for your [Kotlin](https:\u002F\u002Fkotlinlang.org\u002F) projects.\n- Highly configurable rule sets.\n- Generate baselines to suppress existing issues for legacy projects while making sure no new issues are introduced.\n- Suppress issues in source files using `@Suppress` annotations.\n- Support for different report formats: HTML, Markdown, [SARIF](https:\u002F\u002Fsarifweb.azurewebsites.net\u002F), XML (Checkstyle) and custom reports.\n- [Extend detekt](https:\u002F\u002Fdetekt.dev\u002Fdocs\u002Fintroduction\u002Fextensions) with custom rule sets and reports.\n- Complexity reports based on lines of code, cyclomatic complexity and number of code smells.\n- First party integration with Gradle with our [Gradle plugin](#with-gradle).\n- A community of [third party plugins](https:\u002F\u002Fgithub.com\u002Ftopics\u002Fdetekt-plugin) that adds more rules and features to detekt.\n\n#### Quick-Links\n\n- [Changelog and migration guides](https:\u002F\u002Fdetekt.dev\u002Fchangelog.html)\n- [Available CLI options](https:\u002F\u002Fdetekt.dev\u002Fcli.html)\n- [Rule set and rule descriptions](https:\u002F\u002Fdetekt.dev\u002Fcomplexity.html)\n- [Writing custom rules and extending detekt](https:\u002F\u002Fdetekt.dev\u002Fdocs\u002Fintroduction\u002Fextensions\u002F)\n- [Suppressing issues in code](https:\u002F\u002Fdetekt.dev\u002Fsuppressing-rules.html)\n- [Suppressing issues via baseline file](https:\u002F\u002Fdetekt.dev\u002Fbaseline.html)\n- [Configuring detekt](https:\u002F\u002Fdetekt.dev\u002Fconfigurations.html)\n- Sample Gradle integrations examples:\n    - [multi project (Kotlin DSL)](https:\u002F\u002Fgithub.com\u002Fdetekt\u002Fdetekt\u002Fblob\u002Fmain\u002Fbuild.gradle.kts)\n    - [single project (Groovy DSL)](https:\u002F\u002Fgithub.com\u002Farturbosch\u002Fkutils\u002Fblob\u002Fmaster\u002Fbuild.gradle)\n    - [single project (Unofficial Maven plugin)](https:\u002F\u002Fgithub.com\u002Fdetekt\u002Fsonar-kotlin\u002Fblob\u002Fmain\u002Fpom.xml)\n\n### Quick Start ...\n\n#### with the command-line interface\n\n```sh\ncurl -sSLO https:\u002F\u002Fgithub.com\u002Fdetekt\u002Fdetekt\u002Freleases\u002Fdownload\u002Fv[version]\u002Fdetekt-cli-[version]-all.jar\njava -jar detekt-cli-[version]-all.jar --help\n```\n\nYou can find [other ways to install detekt here](https:\u002F\u002Fdetekt.dev\u002Fcli.html)\n\n#### with Gradle\n\n```kotlin\nplugins {\n    id(\"io.gitlab.arturbosch.detekt\") version \"[version]\"\n}\n\nrepositories {\n    mavenCentral()\n}\n\ndetekt {\n    buildUponDefaultConfig = true \u002F\u002F preconfigure defaults\n    allRules = false \u002F\u002F activate all available (even unstable) rules.\n    config.setFrom(\"$projectDir\u002Fconfig\u002Fdetekt.yml\") \u002F\u002F point to your custom config defining rules to run, overwriting default behavior\n    baseline = file(\"$projectDir\u002Fconfig\u002Fbaseline.xml\") \u002F\u002F a way of suppressing issues before introducing detekt\n}\n\ntasks.withType\u003CDetekt>().configureEach {\n    reports {\n        html.required.set(true) \u002F\u002F observe findings in your browser with structure and code snippets\n        checkstyle.required.set(true) \u002F\u002F checkstyle(xml) like format mainly for integrations like Jenkins\n        sarif.required.set(true) \u002F\u002F standardized SARIF format (https:\u002F\u002Fsarifweb.azurewebsites.net\u002F) to support integrations with GitHub Code Scanning\n        markdown.required.set(true) \u002F\u002F simple Markdown format\n    }\n}\n\n\u002F\u002F Groovy DSL\ntasks.withType(Detekt).configureEach {\n    jvmTarget = \"1.8\"\n}\ntasks.withType(DetektCreateBaselineTask).configureEach {\n    jvmTarget = \"1.8\"\n}\n\n\u002F\u002F or\n\n\u002F\u002F Kotlin DSL\ntasks.withType\u003CDetekt>().configureEach {\n    jvmTarget = \"1.8\"\n}\ntasks.withType\u003CDetektCreateBaselineTask>().configureEach {\n    jvmTarget = \"1.8\"\n}\n```\n\nSee [maven central](https:\u002F\u002Fsearch.maven.org\u002Fartifact\u002Fio.gitlab.arturbosch.detekt\u002Fdetekt-cli) for releases and [sonatype](https:\u002F\u002Fcentral.sonatype.com\u002Frepository\u002Fmaven-snapshots\u002F) for snapshots.\n\nIf you want to use a SNAPSHOT version, you can find more info on [this documentation page](https:\u002F\u002Fdetekt.dev\u002Fsnapshots.html).\n\n#### Requirements\n\n##### Executing detekt\n\nGradle 6.8.3+ is the minimum requirement. However, the recommended versions together with the other tools recommended versions are:\n\n| Detekt Version  | Gradle   | Kotlin   | AGP      | Java Target Level | JDK Max Version |\n|-----------------|----------|----------|----------|-------------------|-----------------|\n| `2.0.0-alpha.3` | `9.3.1`  | `2.3.21` | `9.1.1`  | `1.8`             | `25`            |\n| `2.0.0-alpha.2` | `9.3.0`  | `2.3.0`  | `9.0.0`  | `1.8`             | `25`            |\n| `2.0.0-alpha.1` | `9.1.0`  | `2.2.20` | `8.13.0` | `1.8`             | `25`            |\n| `2.0.0-alpha.0` | `8.13.0` | `2.2.10` | `8.13.0` | `1.8`             | `21`            |\n| `1.23.8`        | `8.12.1` | `2.0.21` | `8.8.1`  | `1.8`             | `21`            |\n\nThe list of [recommended versions for previous detekt version is listed here](https:\u002F\u002Fdetekt.dev\u002Fcompatibility.html).\n\n##### Building detekt\n\nJava 17 or higher is required to build detekt.\n\n### Adding more rule sets\n\ndetekt itself provides a wrapper over [ktlint](https:\u002F\u002Fgithub.com\u002Fpinterest\u002Fktlint) as the `ktlint` rule set\nwhich can be easily added to the Gradle configuration:\n\n```kotlin\ndependencies {\n    detektPlugins(\"io.gitlab.arturbosch.detekt:detekt-rules-ktlint-wrapper:[version]\")\n}\n```\n\nSimilarly, there are extra rule sets available for detekt from detekt:\n```kotlin\ndependencies {\n    detektPlugins(\"io.gitlab.arturbosch.detekt:detekt-rules-libraries:[version]\")\n    detektPlugins(\"io.gitlab.arturbosch.detekt:detekt-rules-ruleauthors:[version]\")\n}\n```\nFor more info visit the [Detekt Marketplace](https:\u002F\u002Fdetekt.dev\u002Fmarketplace).\n\nLikewise custom [extensions](https:\u002F\u002Fdetekt.dev\u002Fdocs\u002Fintroduction\u002Fextensions\u002F) can be added to detekt.\n\n### Contributing\n\nSee [CONTRIBUTING](.github\u002FCONTRIBUTING.md)\n\nThanks to all the people who contributed to detekt!\n\n[![Profile images of all the contributors](https:\u002F\u002Fcontrib.rocks\u002Fimage?repo=detekt\u002Fdetekt)](https:\u002F\u002Fgithub.com\u002Fdetekt\u002Fdetekt\u002Fgraphs\u002Fcontributors)\n\n### Mentions\n\n[![androidweekly](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fandroidweekly.net-259-orange.svg?style=flat-square)](http:\u002F\u002Fandroidweekly.net\u002Fissues\u002Fissue-259)\n[![androidweekly](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fandroidweekly.cn-154-orange.svg?style=flat-square)](http:\u002F\u002Fandroidweekly.cn\u002Fandroid-dev-wekly-issue-154\u002F)\n\nAs mentioned in...\n\n- [To Detekt 2.0, and beyond!](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=6EQd_SDR6n0)\n- [droidcon London 2021 - Detekt - State of the Union](https:\u002F\u002Fwww.droidcon.com\u002F2021\u002F11\u002F17\u002Fdetekt-state-of-the-union-2\u002F)\n- [KotlinConf 2018 - Safe(r) Kotlin Code - Static Analysis Tools for Kotlin by Marvin Ramin](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=yjhQiP0329M)\n- [droidcon NYC 2018 - Static Code Analysis For Kotlin](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=LT6m5_LO2DQ)\n- Kotlin on Code Quality Tools - by @vanniktech [Slides](https:\u002F\u002Fdocs.google.com\u002Fpresentation\u002Fd\u002F1sUoQCRHTR01JfaS67Qkd7K1rdRLOhO6QGCelZZwxOKs\u002Fedit) [Presentation](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=FKDNE6PPTTE)\n- [Integrating detekt in the Workflow](https:\u002F\u002Fwww.raywenderlich.com\u002F24470020-integrating-detekt-in-the-workflow)\n- [Check the quality of Kotlin code](https:\u002F\u002Fblog.frankel.ch\u002Fcheck-quality-kotlin-code\u002F)\n- [Kotlin Static Analysis Tools](http:\u002F\u002Fsmyachenkov.com\u002Fposts\u002Fkotlin-static-analysis-tools\u002F)\n- [Are you still smelling it?: A comparative study between Java and Kotlin language](https:\u002F\u002Fdoi.org\u002F10.1145\u002F3267183.3267186) by [Flauzino et al.](https:\u002F\u002Fgithub.com\u002Fmatheusflauzino\u002Fsmells-experiment-Kotlin-and-Java)\n- [Preventing software antipatterns with Detekt](https:\u002F\u002Fgaller.dev\u002Fpreventing-software-antipatterns-with-detekt\u002F)\n\nIntegrations:\n\n- [IntelliJ integration](https:\u002F\u002Fgithub.com\u002Fdetekt\u002Fdetekt-intellij-plugin)\n- [SonarQube integration](https:\u002F\u002Fdocs.sonarsource.com\u002Fsonarqube\u002Flatest\u002Fanalyzing-source-code\u002Fimporting-external-issues\u002Fexternal-analyzer-reports\u002F)\n- [TCA(Tencent CodeAnalysis) integration](https:\u002F\u002Fgithub.com\u002FTencent\u002FCodeAnalysis\u002Fblob\u002Fmain\u002Fclient\u002Ftool\u002Fdetekt.py)\n- [Codacy](https:\u002F\u002Fwww.codacy.com)\n- [Gradle plugin that configures Error Prone, Checkstyle, PMD, CPD, Lint, Detekt & Ktlint](https:\u002F\u002Fgithub.com\u002Fvanniktech\u002Fgradle-code-quality-tools-plugin)\n- [Violations Lib](https:\u002F\u002Fgithub.com\u002Ftomasbjerre\u002Fviolations-lib) is a Java library for parsing report files like static code analysis.\n- [sputnik](https:\u002F\u002Fgithub.com\u002FTouK\u002Fsputnik) is a free tool for static code review and provides support for detekt\n- [Detekt Maven plugin](https:\u002F\u002Fgithub.com\u002FOzsie\u002Fdetekt-maven-plugin) that wraps the Detekt CLI\n- [Detekt Bazel plugin](https:\u002F\u002Fgithub.com\u002Fbuildfoundation\u002Fbazel_rules_detekt) that wraps the Detekt CLI\n- [Gradle plugin that helps facilitate GitHub PR checking and automatic commenting of violations](https:\u002F\u002Fgithub.com\u002Fbtkelly\u002Fgnag)\n- [Codefactor](http:\u002F\u002Fcodefactor.io\u002F)\n- [GitHub Action: Detekt All](https:\u002F\u002Fgithub.com\u002Fmarketplace\u002Factions\u002Fdetekt-all)\n- [GitHub Action: Setup detekt](https:\u002F\u002Fgithub.com\u002Fmarketplace\u002Factions\u002Fsetup-detekt)\n\nCustom rules and reports from 3rd parties can be found on our [**Detekt Marketplace**](https:\u002F\u002Fdetekt.dev\u002Fmarketplace).\n\n#### Credits\n\n- [JetBrains](https:\u002F\u002Fgithub.com\u002Fjetbrains\u002F) - Creating IntelliJ + Kotlin\n- [PMD](https:\u002F\u002Fgithub.com\u002Fpmd\u002Fpmd) & [Checkstyle](https:\u002F\u002Fgithub.com\u002Fcheckstyle\u002Fcheckstyle) & [ktlint](https:\u002F\u002Fgithub.com\u002Fpinterest\u002Fktlint) - Ideas for threshold values and style rules\n","detekt 是一个针对 Kotlin 项目的静态代码分析工具。它提供了一系列高度可配置的规则集，用于识别和报告代码中的潜在问题（如代码异味），并支持生成基线以抑制现有问题，确保在维护旧项目时不会引入新的问题。此外，detekt 支持多种报告格式（包括 HTML、Markdown 和 SARIF 等），允许用户通过注解直接在源文件中抑制特定问题，并且可以扩展自定义规则集和报告。该项目还提供了与 Gradle 的原生集成，便于在构建过程中自动执行代码检查。适用于需要提高 Kotlin 代码质量的各种开发场景，无论是个人项目还是企业级应用。",2,"2026-06-11 03:11:16","top_language"]