This page is not yet available in Spanish. We are working on its translation.
If you have any questions or feedback about our current translation project, feel free to reach out to us!

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

Integraciones sin problemas. Prueba Datadog Code Security