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/unary-operator-spacing

Language: Kotlin

Severity: Notice

Category: Code Style

Description

It is recommended to have no spaces around unary operators.

Non-Compliant Code Examples

fun foo1(i: Int) = i ++

fun foo2(i: Int) = ++ i

fun foo3(i: Int) = ++
    i

Compliant Code Examples

fun foo1(i: Int) = i++

fun foo2(i: Int) = ++i

fun foo3(i: Int) = ++i
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