Uploaded image for project: 'SonarCFamily'
  1. SonarCFamily
  2. CPP-2807

DuplicatedBlocks: Demonstrate the duplicate blocks as secondary locations

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      The rule reports on the first line of the file with duplicate blocks. It is difficult to find the mentioned blocks, especially in big files. The rule should make it easier by reporting them as secondary locations.

      The rule implementation seems to be generic. Incidentally, the rule has no hits on peach for C, C++, C#, or Objective-C. Yet it has many hits for Java. For example, https://peach.sonarsource.com/project/issues?id=java-sr%3Akeycloak%3A11.0.0&issues=AXQAtoovbgvlTzbiaagv&open=AXQAtoovbgvlTzbiaagv

      Here is a related report for C++ on SonarCloud: https://sonarcloud.io/project/issues?id=Deltares_Grid_Editor_back-end&issues=AXWT1LgwJuq5Kgj58pDU&open=AXWT1LgwJuq5Kgj58pDU

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                arseniy.zaostrovnykh Arseniy Zaostrovnykh
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: