Uploaded image for project: 'SonarSwift'
  1. SonarSwift
  2. SONARSWIFT-361

Adjust rule S1751 to report only loops with one iteration

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.2
    • Component/s: Rules
    • Labels:
      None

      Description

      The scope of rule RSPEC-1751 has been reduced with another RSPEC-3626 covering part of the cases. So rule S1751 should be adjusted to only catch cases when there is a loop with single iteration. Note that the case when `return` is not the last statement in the function should be covered by RSPEC-1763.

      RSPEC-3626 will be implemented in another ticket (in the same version!).
      We expect some issues to be reopened with new rule key, but we believe it's affordable here as this rule does not report a lot of issues.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              elena.vilchik Elena Vilchik
              Reporter:
              freddy.mallet Freddy Mallet (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: