このページは日本語には対応しておりません。随時翻訳に取り組んでいます。
翻訳に関してご質問やご意見ございましたら、お気軽にご連絡ください

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

Seamless integrations. Try Datadog Code Security