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: swift-code-style/if-let-shorthand

Language: Unknown

Severity: Warning

Category: Code Style

Description

Non-Compliant Code Examples

if let name = name {
    // ...
}

if let self = self {
    // ...
}
    
if interactionEnabled,
   let userTapLocation = userTapLocation {
    // ...
}

if let user = user, 
   var device = device {
    // ...
}

Compliant Code Examples

if let name {
    // ...
}

if let name = user?.name {
    // ...
}
    
if let user = user as? User {
    // ...
}
 
if var user = currentUser() {
    // ...
}
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