Hello Sonar team
,
I’m facing a persistent SonarLint analysis failure on a large Android project.
After extensive troubleshooting, this looks like a Kotlin analyzer incompatibility rather than a project misconfiguration.
I’ll try to be as precise and reproducible as possible.
Environment
• OS: macOS 26.2 (Apple Silicon)
• IDE: Android Studio Otter 3 Feature Drop | 2025.2.3
Build #AI-252.28238.7.2523.14688667 (Jan 9, 2026)
• Runtime: 21.0.8±14196175-b1038.72 (JetBrains)
• JVM: OpenJDK 64-Bit Server VM by JetBrains
• Memory: 5 GB
• Cores: 10
• Metal rendering: ON
Installed non-bundled plugins
• SonarLint for IntelliJ: 11.12.0.84088
• Snyk
• Anthropic Code plugin
• JetBrains Marketplace
• Full Line Completion
Project characteristics
• Android multi-module project
• ~900+ Kotlin source files
• Mix of Java + Kotlin
• Uses modern Kotlin features
• Gradle build syncs and compiles successfully
• No syntax errors (verified)
Kotlin / Gradle setup
• AGP: 8.10.0
• Kotlin versions tested:
- 2.2.21
- 2.1.21
• KSP versions tested: - 2.2.20-2.0.3
- 2.1.21-1.0.20
• Gradle: 8.14.3
• JDK for Gradle: Java 21 (Amazon Corretto / JetBrains runtime)
Build works fine in all cases.
The problem
SonarLint always fails during Kotlin analysis with an internal error.
Typical behavior:
• Java analysis completes successfully
• Kotlin analysis starts (hundreds of files)
• Analysis crashes with:
ResponseErrorException: Internal errorError during analysis
• Sometimes it hangs, sometimes it fails immediately
Relevant log excerpt:
[sonarlint-analysis-scheduler] INFO ProgressReport - 935 source files to be analyzed
… then analysis fails with internal error
Important observations
SonarLint works perfectly on:
• Small Android/Kotlin projects
• Same IDE
• Same SonarLint version
• Same machine
SonarLint fails only on this large project.
Binding vs disconnected mode:
• Connected mode → fails
• Disconnected mode → fails
• Same result
Kotlin K2 mode:
• K2 OFF → analysis often hangs
• K2 ON → analysis progresses further but still crashes
File exclusions / scope limiting:
• Tried sonar.inclusions / sonar.exclusions
• Tried limiting to a single package
• Tried excluding build/, generated/, res/, assets/
• Analyzer still crashes globally
Cache & reinstall attempts:
• Removed all SonarLint caches
• Fully uninstalled plugin
• Deleted ~/.sonarlint
• Reinstalled plugin cleanly
• Same result
Comparison with teammate:
• Same repo
• Same SonarLint version
• Works on teammate’s machine
• Suggests environment + Kotlin analyzer interaction
What this suggests
This does not appear to be:
• A Gradle issue
• A Kotlin syntax issue
• A project configuration issue
It does appear to be:
• A Kotlin analyzer bug triggered by:
- Project size
- Specific Kotlin constructs
- Or Kotlin/K2/IDE compatibility
Question
-
Is there a known incompatibility between:
- SonarLint Kotlin analyzer
- Kotlin 2.1+ / 2.2+
- Android Studio Otter 2025.2.x?
-
Is there any way to:
- Run Kotlin analysis incrementally?
- Disable specific Kotlin rules?
- Enable deeper debug logging for Kotlin parsing?
-
Would providing a minimal reproducer (subset of files) help?
I’m happy to provide additional logs or isolate problematic files if needed.
Thanks a lot for your time and for maintaining SonarLint ![]()