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

FP on S2275: string on multiple lines separated by "+" raise issues

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.3
    • Fix Version/s: 3.4
    • Component/s: Rules
    • Labels:
      None

      Description

      The following code should not raise an issue. The rule trigger an issue when encountering the "+" operator without checking lines.

        String msg = String.format(
          "line1 %s " +  // Should not raise an issue
          "line2", "myValue");
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              nicolas.peru Nicolas Peru
              Reporter:
              michael.gumowski Michael Gumowski
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: