> If a Kotlin file contains a single class (pot...
# codingconventions
t
If a Kotlin file contains a single class (potentially with related top-level declarations), its name should be the same as the name of the class, with the .kt extension appended. If a file contains multiple classes, or only top-level declarations, choose a name describing what the file contains, and name the file accordingly.
What if file contains extensions for library class and one helper
data class
. For example, extensions for Android
TextView
and one
SpanInfo
helper class? Naming it
TextViewExtensions.kt
is better then
SpanInfo.kt
🤔