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

Metadata

ID: kotlin-code-style/annotation-spacing

Language: Kotlin

Severity: Notice

Category: Code Style

Description

Each annotations should be placed on a separate line. This is important because it makes the code more readable and easier to understand. When multiple annotations are placed on the same line, it can become difficult to distinguish between them and understand their individual impacts on the associated code.

Non-Compliant Code Examples

@JvmField

fun foo() {}

@Foo @Bar
/**
 * block comment
 */
class FooBar {
}

Compliant Code Examples

@JvmField
fun foo() {}

/**
 * block comment
 */
@Foo
class FooBar {
}
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: guillaume.barrier/ERRORT-5095-general-doc-update