Custom Lint issues are not reliably highlighted in the IDE for pure-Java/Kotlin modules.
This repository contains of an Android app, a Kotlin lib and a custom Lint checks registry.
This registry contains one custom Lint check that discourages developers from using Kotlin's
runCatching method.
- Open
MainActivityin theappmodule and observe how therunCatchingusage inonCreate()is properly highlighted in the IDE - Open
MyClassin thelibmodule and observe how therunCatchingusage incalculate()is not properly highlighted in the IDE - Run
./gradlew :app:lintDebugand observe how the task reports the Lint issue - Run
./gradlew :lib:lintJvmand observe how the task reports the Lint issue
Since Lint correctly identifies the rule violation in the pure-Kotlin library module, the expectation is that it should also highlight this to the developer proactively via the IDE.
Android Studio Narwhal 4 Feature Drop | 2025.1.4 Canary 3 Build #AI-251.27812.49.2514.14014849, built on August 29, 2025 Runtime version: 21.0.7+-13880790-b1038.58 aarch64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Toolkit: sun.lwawt.macosx.LWCToolkit macOS 15.6 Kotlin plugin: K2 mode Kotlin analyzer version: 2.2.255-dev-255 GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation Memory: 4096M Cores: 12 Metal Rendering is ON Registry: ide.instant.shutdown=false ide.experimental.ui=true gradle.phased.sync.enabled=true com.android.studio.ml.activeModel=com.android.studio.ml.AidaModel