Sonar-Python and Coverage.py work differently when the source directory is symbolic links

I’m using Coverage.py to output xml reports, which I then scan with sonar.
However, if the source directory (or its parent) is a symbolic link, the coverage report in SonarQube shows 0%.

I checked the cause and found that the source in the xml report output by Coverage.py is the path where the symbolic link was resolved. On the other hand, SonarQube does not do this, so there seems to be a mismatch in the source specification.

I would like Sonar-Python to resolve symbolic links in the source in the same way that Coverage.py does, or to follow symbolic links in the source to determine that they are in the same directory and report the correct coverage.

Hello @knutze ,

First, I’m very sorry for the late reply.
Thank you for your feature suggestion. Can you please verify in what cases you would have a symbolic link as a source directory?
I’d like to understand if there is a common use-case where symbolic links are frequently used. Is this related to the CI tool you’re using?