-
Improvement
-
Resolution: Fixed
-
Minor
-
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?
I think it should not harm if I replace the exception with a logging statement (or ignore it anyway). The error will show up anyway when you click into the source code view that should visualize the warning (not as exception but as a error message in the view).
Note that without source files the detection of new and fixed warnings will not work well.