Este producto no es compatible con el sitio Datadog seleccionado. ().
Esta página aún no está disponible en español. Estamos trabajando en su traducción.
Si tienes alguna pregunta o comentario sobre nuestro actual proyecto de traducción, no dudes en ponerte en contacto con nosotros.

Metadata

ID: kotlin-code-style/double-colon-spacing

Language: Kotlin

Severity: Notice

Category: Code Style

Description

In callable references, there should be no spaces separating the class, instance, method, or property from the double colons (::).

An expression like List::filter is correct, while List :: filter is not.

Non-Compliant Code Examples

val clz1 = Foo ::class
val clz2 = Foo:: class
val clz3 = Foo :: class

val filter1 = List ::filter
val filter2 = List:: filter
val filter3 = List :: filter

val constr = :: Regex

Compliant Code Examples

val filter = List::filter
val clz = Foo::class
val constr = ::Regex
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