You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the Flutter repository relies on a mix of formatting tools for Kotlin code, primarily ktlint and ktformat. While these tools are excellent for enforcing stylistic consistency (like whitespace and import ordering), they lack deeper semantic static analysis capabilities.
A specific use case we recently encountered during the AGP 9.1.0 migration was the introduction of redundant fully qualified class names (e.g., using com.android.build.api.dsl.ApplicationExtension inline when ApplicationExtension was already imported at the top of the file). That was caught in code review.
Consider adopting Detekt, the standard static analysis tool for Kotlin. Detekt can catch code smells and semantic errors that formatters miss. For example, its UnnecessaryFullyQualifiedName rule would have automatically caught and prevented the redundant qualification issue we encountered.
Generally we agree that tool based formatting and static analysis are useful. They are more useful in languages where contributors may not have it be their primary language or when llm coding assistants author code.
Activity
reidbaker commentedon Sep 1, 2026
another example, catching test methods with no @test annotation https://github.com/flutter/flutter/pull/192116/changes#r3908218009