-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cobertura coverage does not support drive letter only in source tag #1682
Comments
Hi @shader-man, which version of the plugin are you using? There was a similar issue we fixed with 1.2.2 snapshot (#1678, #1679). You can download it from here: https://ci.appveyor.com/project/SonarOpenCommunity/sonar-cxx/branch/master/artifacts Regards, |
Hi @guwirth , |
Hi @guwirth ,
I don't know if the problem is still because of the lowercase or because i'm missing a / between my drive letter and the root folder. |
@shader-man Did you forget to re-open this issue? For me plugin 2.0.5 still shows the same problem. |
Hi @shader-man, hearing nothing means always it works :-).
There must be a This is the parser reading Cobertura coverage files: These are the unit tests: Here are test cases we are using: Maybe you can have a look and provide a test file for your case. Regards, |
Hi @shader-man, don't know if the sample is still valid? <sources>
<source>f:</source>
</sources> ...
<class name="file.h" filename="my/file/path/file.h" line-rate="0" branch-rate="0" complexity="0">
...
Problem seems to be here: sonar-cxx/cxx-sensors/src/main/java/org/sonar/cxx/sensors/coverage/cobertura/CoberturaParser.java Line 79 in f267915
Regards, |
Hi @guwirth , sorry i can't remember what was happening 3 years ago :) . I think we went around this issue by having a python script fixing the path in the problematic reports. |
- source tag: drive letter without file separator was not supported in the past - close SonarOpenCommunity#1682 Sample: ´´´XML <sources> <source>f:</source> </sources> ... <class name="file.h" filename="my/file/path/file.h" line-rate="0" branch-rate="0" complexity="0"> ... ´´´
- source tag: drive letter without file separator was not supported in the past - use Apache Maven 3.8.3 - close SonarOpenCommunity#1682 Sample: ```XML <sources> <source>f:</source> </sources> ... <class name="file.h" filename="my/file/path/file.h" line-rate="0" branch-rate="0" complexity="0"> ... ```
Hi @shader-man, see #2268 you can try it with https://ci.appveyor.com/project/SonarOpenCommunity/sonar-cxx/branch/master/artifacts Regards. |
Hi,
generating a cobertura report from opencppcoverage fill all the "filename" paths in lowercase ( info extracted from PDB files on windows )
<?xml version="1.0" encoding="utf-8"?> <coverage line-rate="0.34319526627218933" branch-rate="0" complexity="0" branches-covered="0" branches-valid="0" timestamp="0" lines-covered="116" lines-valid="338" version="0"> <sources> <source>f:</source> </sources> <packages> <package name="f:/build/MyDLL.dll" line-rate="0.34319526627218933" branch-rate="0" complexity="0"> <classes> <class name="file.h" filename="f:/my/file/path/file.h" line-rate="0" branch-rate="0"
complexity="0">`the cobertura coverage sensor cannot associate the file path in mixed case with this windows lower case path and gives the following error :
07:44:03.310 INFO: Added coverage report 'f:/My/File/Path/report.xml' (parsed by: CoberturaParser) 07:44:03.311 DEBUG: save coverage measure for file: 'f:/my/file/path/file.h' cxxFile = 'null' 07:44:03.311 DEBUG: Cannot find the file 'f:/my/file/path/file.h', ignoring coverage measures
I fed a case-correct cobertura to the plugin and it worked.
would it be possible to ignore the casing for file association?
thanks,
The text was updated successfully, but these errors were encountered: