codeclimate / test-reporter

Code Climate Test Reporter
MIT License
156 stars 76 forks source link

Adding back prefixes to fallbackBlob #428

Closed wesgur closed 3 years ago

wesgur commented 4 years ago

Prefixes provided as options --prefix and --add-prefix seems to be missing when reading the blob_id for source files. So added a condition to check and add the prefixes back if the path to the source file does not exist.

Related Issues:

427

CLAassistant commented 4 years ago

CLA assistant check
All committers have signed the CLA.

noelia-lencina commented 3 years ago

Hi, @wesgur! Thank you for submitting this PR and also, apologies that it has taken us this long to get to it. The issue you are referencing here has a root cause not in our test reporter, rather than in the tool used in the express project you built as an example. That tool is not following the lcov standard format which is causing this unexpected behavior. You can see more information about this problem here and here. Unfortunately, this is an ongoing issue in that tool, so I'd suggest using another tool or submitting the issue there. The code in this PR, though it fixes the problem for this particular case, is using the --prefix option in the opposite way it's supposed to be used in the rest of the code, which may cause problems for other projects. Besides that, accommodating to a particular tool that has a bug will probably cause more issues. Let me know if you have questions or comments about this. I'll be closing this PR for now.