Este producto no es compatible con el sitio Datadog seleccionado. ().
Esta página aún no está disponible en español. Estamos trabajando en su traducción.
Si tienes alguna pregunta o comentario sobre nuestro actual proyecto de traducción, no dudes en ponerte en contacto con nosotros.

Metadata

ID: kotlin-code-style/annotation-spacing

Language: Kotlin

Severity: Notice

Category: Code Style

Description

Each annotations should be placed on a separate line. This is important because it makes the code more readable and easier to understand. When multiple annotations are placed on the same line, it can become difficult to distinguish between them and understand their individual impacts on the associated code.

Non-Compliant Code Examples

@JvmField

fun foo() {}

@Foo @Bar
/**
 * block comment
 */
class FooBar {
}

Compliant Code Examples

@JvmField
fun foo() {}

@JvmField
fun foo(
    x: Int
) {}

/**
 * block comment
 */
@Foo
class FooBar {
}

@Foo
@Bar
class FooBar {
}
https://static.datadoghq.com/static/images/logos/github_avatar.svg https://static.datadoghq.com/static/images/logos/vscode_avatar.svg jetbrains

Integraciones sin problemas. Prueba Datadog Code Security