Skip to main content

detekt

Use this skill when the user wants static analysis for Kotlin code — detect code smells, complexity, style violations, and generate reports for CI pipelines.

来源信息

仓库
javimosch/supercli
最近来源活动
2026年7月21日 00:50
检测到的 SKILL.md 语言
英语
星标
51
分支
7

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
detekt
description
Use this skill when the user wants static analysis for Kotlin code — detect code smells, complexity, style violations, and generate reports for CI pipelines.
# detekt Plugin Static analysis for Kotlin and Gradle projects. Enforces style rules, flags complexity and smells, and integrates with CI via SARIF/XML/TXT reports. ## Installation ```bash brew install detekt # or via Gradle plugin in build.gradle.kts: # plugins { id("io.gitlab.arturbosch.detekt") version "1.23.7" } ``` Download CLI jars from [GitHub Releases](https://github.com/detekt/detekt/releases). ## Basic Usage ```bash # Analyze a Kotlin project directory detekt --input src/ # Use a custom ruleset config detekt --config detekt.yml --input . # Generate a report for CI detekt --input src/ --report xml:build/detekt.xml # Auto-correct fixable issues detekt --input src/ --auto-correct ``` ## Common Patterns ```bash # Baseline existing issues (ignore legacy debt) detekt --create-baseline --baseline detekt-baseline.xml --input src/ detekt --baseline detekt-baseline.xml --input src/ # Fail build on findings detekt --input src/ --fail-on-max-issues 0 # Gradle wrapper (typical in Kotlin repos) ./gradlew detekt ``` ## Usage Examples - "Run detekt on this Kotlin module" - "Generate an XML report for CI" - "Check for code smells before opening a PR" ## SuperCLI ```bash sc detekt _ _ --input src/ sc detekt _ _ --config detekt.yml --input . sc plugins learn detekt ```
在 GitHub 查看