Ce produit n'est pas pris en charge par le site Datadog que vous avez sélectionné. ().
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/function-return-type-spacing

Language: Kotlin

Severity: Notice

Category: Code Style

Description

Kotlin enforces consistent spacing around the function return type: one space before the return type.

Non-Compliant Code Examples

fun foo1() : String = "some-result"

fun foo2():  String = "some-result"

fun foo3():String = "some-result"

fun foo4():
    String = "some-result"

fun foo5(bar: String):String = "some-result"

fun foo6() :String = "some-result"

Compliant Code Examples

fun foo(): String = "some-result"
https://static.datadoghq.com/static/images/logos/github_avatar.svg https://static.datadoghq.com/static/images/logos/vscode_avatar.svg jetbrains