-
Notifications
You must be signed in to change notification settings - Fork 485
Open
Description
I've got a number of classes with annotations on constructor parameters like this:
sealed class ConnectionStatus(
@all:StringRes val stringId: Int,
@all:ColorRes val color: Int,
val spinnerVisibility: Int = View.GONE,
) {
data object NotConnected : ConnectionStatus(R.string.not_connected, R.color.notConnected)
data object Connecting :
ConnectionStatus(R.string.connecting, R.color.connecting, View.VISIBLE)
data object Connected : ConnectionStatus(R.string.connected, R.color.connected)
data object Failed : ConnectionStatus(R.string.failed_to_connect, R.color.failedToConnect)
data object HeartbeatLost : ConnectionStatus(R.string.connection_lost, R.color.heartbeatLost)
}
They're causing false errors in the ktlint
and ktfmt
formatters:
src/main/kotlin/artemis/agent/ConnectionStatus.kt:L8 ktlint(ktlint) Expected annotation target before ':'
src/main/kotlin/artemis/agent/ConnectionStatus.kt:L8 ktfmt(ktfmt) error: Expected annotation target before ':'
Metadata
Metadata
Assignees
Labels
No labels