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

Do not throw exception during hash computation if source code is not available

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • analysis-core-plugin
    • None

      Hi there

      First of all - sorry if this is not the right way of asking such questions.

      I'm trying to migrate from freestyle PMD plugin based duplication report to pipelines DRY plugin based duplication report.

      In our build flow, we launch ant build that produces cpd-pmd XML report inside of a docker container. This docker image/container is the only place where source code lives.
      After XML is ready it is copied to a side and docker container is destroyed.

      On next pipeline step I'm trying to publish DRY report which fails with
      java.io.FileNotFoundException: /var/www/project/sourceFile.php (No such file or directory)

      I've traced this to below line in dry plugin source code:
      https://github.com/jenkinsci/dry-plugin/blob/dry-2.46/src/main/java/hudson/plugins/dry/parser/DuplicationParserRegistry.java#L91

      I understand the reason why exception is thrown - plugin excepts/assumes that all the files mentioned in XML are available and it calculates some kind of hash for each (probably for diffing with previous runs reasons - just guessing).

      Since XML itself contains enough information to make the report itself - I would love to see an option that could be used to disable this part of code.

      Is it reasonable/possible to implement such improvement within dry plugin?

          [JENKINS-41323] Do not throw exception during hash computation if source code is not available

            drulli Ulli Hafner
            lukaswoj Ɓukasz Wojciechowski
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: