Files
Amber/app
Claude fb984b8db4 Add LongToDuration lint check mirroring the IDE-only inspection
Android Studio's "Long overload to Duration conversion" inspection
(ConvertLongToDurationInspection) only runs inside the IDE, so its
findings never fail ./gradlew lint. Port it as a custom lint check in a
new lint-rules module: calls to the kotlinx.coroutines timing functions
(delay, withTimeout, debounce, ...) are flagged when the time argument
is a Long/Int rather than a kotlin.time.Duration. Overloads cannot be
told apart at the JVM level (Duration is a value class backed by long),
so the check classifies the argument's Kotlin type via the bundled K2
analysis API.

With warningsAsErrors already enabled, the pre-commit/pre-push hooks and
CI now fail on any new legacy-Long call site.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ho6LW6eEBkVnnpFvr5tvpi
2026-07-08 21:05:34 +00:00
..
2024-03-01 06:56:32 -03:00
2023-07-26 16:44:33 -03:00