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
The Kotlin coding conventions are not very specific about formatting enumerations. Android Kotlin Style Guide is more specific and can be used as a common base for all code styles. Though the exception below does not really make sense to me:
When the constants in an enum are placed on separate lines, a blank line is not required between them except in the case where they define a body.
Additional rules should be:
All enum entries including the braces should be on a single line enum class Answer { YES, NO, MAYBE }, or in case of a multiline declaration, each enum entry is listed on a separate line.
In case the trailing comma's are enabled and the enumeration contains another declaration then semicolon is placed on a separate line below the enumeration entries.
In case the enumeration contains another declaration then the semicolon after the enumeration entries is followed by a blank line followed by the other declaration(s).
The text was updated successfully, but these errors were encountered:
…m should either be a single line, or each enum entry should be defined on a separate line
Closes#1903
Fix bug in RuleProviderSorter. A rule marked with RunAsLateAsPossible should never be run before a rule not having any Rule.VisitorModifier.
* Add new experimental rule `enum-wrapping` for all code styles. An enum should either be a single line, or each enum entry should be defined on a separate line
Closes#1903
Fix bug in RuleProviderSorter. A rule marked with RunAsLateAsPossible should never be run before a rule not having any Rule.VisitorModifier.
The Kotlin coding conventions are not very specific about formatting enumerations. Android Kotlin Style Guide is more specific and can be used as a common base for all code styles. Though the exception below does not really make sense to me:
Additional rules should be:
enum class Answer { YES, NO, MAYBE }
, or in case of a multiline declaration, each enum entry is listed on a separate line.The text was updated successfully, but these errors were encountered: