Uploaded image for project: 'SonarJava'
  1. SonarJava
  2. SONARJAVA-4206

FN on S3012 in case of do-while loop

    XMLWordPrintable

    Details

    • Type: False Negative
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.12
    • Component/s: Rules

      Description

      Rule S3012 surprisingly do not consider do-while loops... while there is no reason to avoid them. The following code should raise an issue:

          do {
            dst[i] = src[i]; // Noncompliant
            i++;
          } while (i < src.length);
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              chrislain.razafimahefa Chrislain Razafimahefa
              Reporter:
              michael.gumowski Michael Gumowski
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: