SonarQube JavaScript
  1. SonarQube JavaScript
  2. SONARJS-125

Rule: Do not use more than one "break" or "continue" statement in loops

    Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Issue Links

        Activity

        Hide
        Freddy Mallet added a comment -

        Works well Evgeny, could you just update :

        • the description
          • The 'break' and 'continue' branching statements increase the essential complexity of the source code by removing the ability to linearly read the flow of statements. Using one 'break' or 'continue' statement in a loop should be highly motivated but is acceptable since this allows optimal coding in some specific cases. However using more than one of those statements in a loop leads to unmaintainable source code.
        Show
        Freddy Mallet added a comment - Works well Evgeny, could you just update : the description The 'break' and 'continue' branching statements increase the essential complexity of the source code by removing the ability to linearly read the flow of statements. Using one 'break' or 'continue' statement in a loop should be highly motivated but is acceptable since this allows optimal coding in some specific cases. However using more than one of those statements in a loop leads to unmaintainable source code.
        Hide
        Evgeny Mandrikov added a comment -

        Integration tests were updated.

        Show
        Evgeny Mandrikov added a comment - Integration tests were updated.
        Hide
        Evgeny Mandrikov added a comment -

        Done.

        Show
        Evgeny Mandrikov added a comment - Done.
        Hide
        Freddy Mallet added a comment -

        Manually tested !

        Show
        Freddy Mallet added a comment - Manually tested !

          People

          • Assignee:
            Evgeny Mandrikov
            Reporter:
            Freddy Mallet
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: