SonarQube
  1. SonarQube
  2. SONAR-3139

Use Sonar CPD with existing extension point CpdMapping

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.14
    • Component/s: Duplications
    • Labels:
      None
    • Number of attachments :
      0

      Description

      In fact Sonar CPD is independent from a way how code was divided on fragments, i.e. it supports not only statement-based detection, but also token-based. And at the same time it shows better memory consumption, same performance and predictable results without dependency on environment (OS, Java) in comparison with PMD CPD. Thus we can quickly benefit from it for existing plugins (open-source and closed-source : Groovy, PHP, C, C#, Cobol, PL/SQL, VisualBasic, Abap, Natural) - no need to wait releases of those plugins with a usage of new extension point, whereas SONAR-2843 remains for support of cross-project analysis. And this will also allow to verify improvements in algorithm (SONAR-3060) for even wider range of projects.

      This implies several internal refactorings. Including review of package "net.sourceforge.pmd.cpd" which was forked from PMD in order to apply specific patches for Sonar. Also note taht this package might cause problems, when it used together with PMD due to the fact that name wasn't changed.

        Issue Links

          Activity

          Hide
          Evgeny Mandrikov added a comment -

          During refactorings don't forget about dependency on PMD CPD from Sonar Useless Code Tracker Plugin - SONARPLUGINS-978

          Show
          Evgeny Mandrikov added a comment - During refactorings don't forget about dependency on PMD CPD from Sonar Useless Code Tracker Plugin - SONARPLUGINS-978
          Hide
          Freddy Mallet added a comment -

          Manually tested

          Show
          Freddy Mallet added a comment - Manually tested
          Hide
          Evgeny Mandrikov added a comment -

          Integration tests were updated.

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

            People

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

              Dates

              • Created:
                Updated:
                Resolved: