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/comment-spacing

Language: Kotlin

Severity: Notice

Category: Code Style

Description

To improve clarity, the // symbol of a line comment should be padded by at least one space on both sides.

Non-Compliant Code Examples

val count: Int = 1//non-compliant
val count: Int = 2// non-compliant
val count: Int = 3 //non-compliant

//non-compliant

    //non-compliant

Compliant Code Examples

val count: Int = 1 // compliant

// compliant

    // compliant
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

PREVIEWING: guillaume.barrier/ERRORT-5095-general-doc-update