| 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
brew install detekt
Download CLI jars from GitHub Releases.
Basic Usage
detekt --input src/
detekt --config detekt.yml --input .
detekt --input src/ --report xml:build/detekt.xml
detekt --input src/ --auto-correct
Common Patterns
detekt --create-baseline --baseline detekt-baseline.xml --input src/
detekt --baseline detekt-baseline.xml --input src/
detekt --input src/ --fail-on-max-issues 0
./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
sc detekt _ _ --input src/
sc detekt _ _ --config detekt.yml --input .
sc plugins learn detekt