All arguments should be on separate lines or the same line.

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/argument-list-wrapping

Language: Kotlin

Severity: Notice

Category: Code Style

Description

All arguments should be on separate lines or the same line.

In long argument lists, put a line break after the opening parenthesis. Indent arguments, and group multiple closely related arguments near each other.

Non-Compliant Code Examples

val foo =
    foo(
        a,
        b, c,
    )

val bar =
    foo(
        a,
        b, c, // hi
    )

    

Compliant Code Examples

val foo =
    foo(
        a,
        b,
        c,
    )

val foo = foo(a, b, c)

private fun telemetryAttributes(
    element: PsiElement,
    logInfo: LogLineInfo
) = mapOf(
    "language" to element.language.id,
    "framework" to logInfo.framework, // deprecated - see IDE-3771 (suggest to remove after May-2025)
    "logs.framework" to logInfo.framework,
    "logs.level" to (logInfo.level?.label ?: "")
)

val servicesWithProfiling = client.profilingApi().findServicesWithProfiling(
                emptySet(),
                ctx.environment, // do we want to pass the env?
                ctx.timeInterval // use context interval
)

drawSquare(
    x = 10, y = 10,
)
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 la Seguridad de Código de Datadog