Details

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

      Description

      Nested CASxx, DO, DOU, DOW, DOUxx, DOWxx, FOR, IF, IFxx, MONITOR and SELECT statements is a key ingredient for making what's known as "Spaghetti code".
      Such code is hard to read, refactor and therefore maintain.

      Noncompliant Code Example

      With the default threshold of 3:

      IF        A <> B
      IF        B <> C
      DOW       B <> A
      IF        A <> D
      ...
      ENDIF
      ENDDO
      ENDIF
      ENDIF
      
      if a <> b;
        if b <> c;
          dow b <> a;
            if a <> d;
              ...
            endif;
          enddo;
        endif;
      endif;
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ann.campbell.2 Ann Campbell
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: