run_linter
Run code linters on Android or iOS projects to identify issues and get structured results with locations and suggestions. Supports Detekt, Android Lint, SwiftLint, and ktlint with optional auto-fix and custom configurations.
Instructions
Run code linter (Detekt, Android Lint, SwiftLint, ktlint). Returns structured lint results with issue locations and suggestions.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"platform": "<platform>",
"projectPath": "<projectPath>"
},
"name": "run_linter"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| platform | Yes | Target platform | |
| projectPath | Yes | Path to the project root directory | |
| linter | No | Linter to run (default: detekt for Android, swiftlint for iOS) | |
| module | No | Gradle module for Android linters (e.g., :app) | |
| configPath | No | Path to linter configuration file | |
| timeoutMs | No | Timeout in milliseconds (default: 300000) | |
| autoFix | No | Auto-fix issues if supported by the linter (default: false) |