Check Kotlin project for code quality issues and violations
From kotlin-development-assistantnpx claudepluginhub pluginagentmarketplace/custom-plugin-kotlin --plugin kotlin-assistantAnalyze Kotlin project for code quality issues, style violations, and potential bugs.
/kotlin-check [path] [--strict] [--fix] [--format <format>]
Runs comprehensive code quality checks on Kotlin projects including:
| Argument | Type | Default | Description |
|---|---|---|---|
path | string | . | Target directory or file |
--strict | boolean | false | Fail on warnings |
--fix | boolean | false | Auto-fix issues |
--format | string | plain | Output format |
# Check entire project
/kotlin-check
# Check specific module with strict mode
/kotlin-check app/src/main --strict
# Auto-fix and output JSON
/kotlin-check --fix --format json
# Check single file
/kotlin-check src/main/kotlin/UserService.kt
| Check | Tool | Severity |
|---|---|---|
| Code formatting | ktlint | Warning |
| Naming conventions | ktlint | Warning |
| Code complexity | detekt | Error |
| Long methods | detekt | Warning |
| Deprecated usage | compiler | Warning |
| Null safety | compiler | Error |
| Code | Meaning | Action Required |
|---|---|---|
| 0 | No issues | None |
| 1 | Issues found | Review and fix violations |
| 2 | Config error | Check ktlint/detekt setup |
| 3 | Runtime error | Check logs for details |
| Issue | Cause | Resolution |
|---|---|---|
| "ktlint not found" | Missing dependency | Add id("org.jlleitschuh.gradle.ktlint") to plugins |
| "detekt not configured" | Missing config | Run ./gradlew detektGenerateConfig |
| Slow execution | Large codebase | Use path argument to scope check |
| False positives | Strict rules | Configure .editorconfig or detekt.yml |
Works with CI/CD pipelines:
# GitHub Actions
- name: Kotlin Check
run: ./gradlew ktlintCheck detekt