Details

    • Type: Language-Specification
    • Status: Active
    • Resolution: Unresolved
    • Labels:
      None
    • Impact:
      Unknown 'null' severity
    • Likelihood:
      Unknown 'null' severity

      Description

      Noncompliant Code Example

      if condition1 {
        if condition2 {
          doSomething()
        }
      }
      
      if let y = someOptional {
        if x > 0 {
          doSomething()
        } 
      }
      

      Compliant Solution

      if condition1 && condition2 {
        doSomething()
      }
      
      if let y = someOptional where x > 0 {
        doSomething()
      }
      
      if x > 0, let y = someOptional {
        doSomething()
      }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                elena.vilchik Elena Vilchik
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: