Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-11376

Don't output multiple warnings for duplicated code

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: dry-plugin
    • Labels:
      None
    • Similar Issues:

      Description

      I would prefer that the plug-in just picked one and skipped the other warnings. Think of a warning as a set of duplicated code:
      file A line x
      file B line y
      file C line z
      This is currently 3 warnings, but should only be 1 warning and should be detectable. I don't care which warning is in the heading, as long as all information is accessible through the warning.

        Attachments

          Issue Links

            Activity

            Hide
            drulli Ulli Hafner added a comment -

            I'm still wondering if I should change the current behavior. I think it is quite useful if you have a duplication in A, B and C that these files are shown in the files tab. Or that these warnings are shown as separate entries in the warnings table.

            Or do you want to change the number of warnings in the graphs and overview only?

            Show
            drulli Ulli Hafner added a comment - I'm still wondering if I should change the current behavior. I think it is quite useful if you have a duplication in A, B and C that these files are shown in the files tab. Or that these warnings are shown as separate entries in the warnings table. Or do you want to change the number of warnings in the graphs and overview only?
            Hide
            jpschewe jpschewe added a comment -

            I'm not sure about the warning count and the graphs. What I find annoying is when I'm looking at the detailed view and I see both sides of the code duplication in the list. I'd rather have something like this:
            First Code duplication found:
            Details of duplication
            file A line x
            file B line y
            file C line z
            Second Code duplication found:
            file A line w
            file D line u

            Show
            jpschewe jpschewe added a comment - I'm not sure about the warning count and the graphs. What I find annoying is when I'm looking at the detailed view and I see both sides of the code duplication in the list. I'd rather have something like this: First Code duplication found: Details of duplication file A line x file B line y file C line z Second Code duplication found: file A line w file D line u
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Ulli Hafner
            Path:
            src/main/java/hudson/plugins/dry/DryTabDetail.java
            src/main/java/hudson/plugins/dry/parser/DuplicateCode.java
            src/main/java/hudson/plugins/dry/parser/cpd/CpdParser.java
            src/main/java/hudson/plugins/dry/parser/simian/SimianParser.java
            src/main/resources/hudson/plugins/dry/DryTabDetail/dry-details.jelly
            src/main/resources/hudson/plugins/dry/DryTabDetail/dry-details_de.properties
            src/main/resources/hudson/plugins/dry/DryTabDetail/dry-details_ja.properties
            src/main/resources/hudson/plugins/dry/DryTabDetail/dry-warnings.jelly
            src/test/java/hudson/plugins/dry/parser/AbstractDuplicationParserTest.java
            src/test/java/hudson/plugins/dry/parser/cpd/CpdParserTest.java
            src/test/java/hudson/plugins/dry/parser/simian/SimianParserTest.java
            http://jenkins-ci.org/commit/dry-plugin/4ebdbbdcc7e475efe9471d967e12e5694a3fbd3d
            Log:
            [FIXED JENKINS-11376] Don't show multiple warnings for duplicated block.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: src/main/java/hudson/plugins/dry/DryTabDetail.java src/main/java/hudson/plugins/dry/parser/DuplicateCode.java src/main/java/hudson/plugins/dry/parser/cpd/CpdParser.java src/main/java/hudson/plugins/dry/parser/simian/SimianParser.java src/main/resources/hudson/plugins/dry/DryTabDetail/dry-details.jelly src/main/resources/hudson/plugins/dry/DryTabDetail/dry-details_de.properties src/main/resources/hudson/plugins/dry/DryTabDetail/dry-details_ja.properties src/main/resources/hudson/plugins/dry/DryTabDetail/dry-warnings.jelly src/test/java/hudson/plugins/dry/parser/AbstractDuplicationParserTest.java src/test/java/hudson/plugins/dry/parser/cpd/CpdParserTest.java src/test/java/hudson/plugins/dry/parser/simian/SimianParserTest.java http://jenkins-ci.org/commit/dry-plugin/4ebdbbdcc7e475efe9471d967e12e5694a3fbd3d Log: [FIXED JENKINS-11376] Don't show multiple warnings for duplicated block.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Ulli Hafner
            Path:
            pom.xml
            http://jenkins-ci.org/commit/analysis-core-plugin/26d3f16b3c1b9eb112dc6d12328d6bbaaa7bd7a3
            Log:
            JENKINS-11376 Temporary checkin to test new behavior.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: pom.xml http://jenkins-ci.org/commit/analysis-core-plugin/26d3f16b3c1b9eb112dc6d12328d6bbaaa7bd7a3 Log: JENKINS-11376 Temporary checkin to test new behavior.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Ulli Hafner
            Path:
            pom.xml
            http://jenkins-ci.org/commit/analysis-core-plugin/85ece4ca433e15c3f605c0a05045458790414b4a
            Log:
            Revert "JENKINS-11376 Temporary checkin to test new behavior."

            This reverts commit 26d3f16b3c1b9eb112dc6d12328d6bbaaa7bd7a3.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: pom.xml http://jenkins-ci.org/commit/analysis-core-plugin/85ece4ca433e15c3f605c0a05045458790414b4a Log: Revert " JENKINS-11376 Temporary checkin to test new behavior." This reverts commit 26d3f16b3c1b9eb112dc6d12328d6bbaaa7bd7a3.
            Hide
            drulli Ulli Hafner added a comment -

            Integrated in Jenkins Analysis Plug-ins (Compile) #627
            JENKINS-11376 Temporary checkin to test new behavior. (Revision 26d3f16b3c1b9eb112dc6d12328d6bbaaa7bd7a3)
            Revert "JENKINS-11376 Temporary checkin to test new behavior." (Revision 85ece4ca433e15c3f605c0a05045458790414b4a)

            Result = SUCCESS

            Show
            drulli Ulli Hafner added a comment - Integrated in Jenkins Analysis Plug-ins (Compile) #627 JENKINS-11376 Temporary checkin to test new behavior. (Revision 26d3f16b3c1b9eb112dc6d12328d6bbaaa7bd7a3) Revert " JENKINS-11376 Temporary checkin to test new behavior." (Revision 85ece4ca433e15c3f605c0a05045458790414b4a) Result = SUCCESS
            Hide
            drulli Ulli Hafner added a comment -

            Integrated in Jenkins Analysis Plug-ins (Compile) #609
            JENKINS-11376 Temporary checkin to test new behavior. (Revision 26d3f16b3c1b9eb112dc6d12328d6bbaaa7bd7a3)
            Revert "JENKINS-11376 Temporary checkin to test new behavior." (Revision 85ece4ca433e15c3f605c0a05045458790414b4a)

            Result = SUCCESS

            Show
            drulli Ulli Hafner added a comment - Integrated in Jenkins Analysis Plug-ins (Compile) #609 JENKINS-11376 Temporary checkin to test new behavior. (Revision 26d3f16b3c1b9eb112dc6d12328d6bbaaa7bd7a3) Revert " JENKINS-11376 Temporary checkin to test new behavior." (Revision 85ece4ca433e15c3f605c0a05045458790414b4a) Result = SUCCESS

              People

              • Assignee:
                drulli Ulli Hafner
                Reporter:
                jpschewe jpschewe
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: