This product is not supported for your selected Datadog site. ().
Cette page n'est pas encore disponible en français, sa traduction est en cours.
Si vous avez des questions ou des retours sur notre projet de traduction actuel, n'hésitez pas à nous contacter.

Metadata

ID: kotlin-code-style/brace-spacing

Language: Kotlin

Severity: Notice

Category: Code Style

Description

In lambda expressions, there should be a space separating each brace from the function’s body. If the function takes parameters, there should also be a space on either side of the arrow.

Non-Compliant Code Examples

val values = list.filter {it > 10}
val values = list.filter { x->x > 10 }

Compliant Code Examples

val values = list.filter { it > 10 }
val values = list.filter { x -> x > 10 }
val values = list.filter int@{ it > 10 }
val values = list.filter {
    it > 10
}
https://static.datadoghq.com/static/images/logos/github_avatar.svg https://static.datadoghq.com/static/images/logos/vscode_avatar.svg jetbrains

Seamless integrations. Try Datadog Code Security

PREVIEWING: heston/DOCS-10466