Swift coverage confused by multiple files with the same name

Description

I was getting odd coverage reports from one file in my Swift project. The file is a small wrapper around the swift-log library (GitHub - apple/swift-log: A Logging API for Swift). In the summaries, it was shown as 171 lines, with only 25% coverage. But when I went to the actual file, it was shown correctly, with its 7 lines all covered.

I believe this is caused by the file having the same path in my project, Sources/Logging/Logging.swift, as a file in swift-log. I checked the file that was uploaded to codecov.io and it looks like packages installed with the Swift Package Manager also get their coverage included in the report. Furthermore, when I renamed the file in my project, the problem went away.

Repository

This is a private repository. The commit before I renamed the file, which still shows the buggy behavior, is 9c1bdf7402e05c4b99d24944245e2d092d8a994e. The commit after renaming the file is 3e50e11bd10556d3ec8a2cef2152daa31b655086.

Hi @asharov, just wanted to see if this was still an issue for you, and I’m sorry it’s taken so long to get back to you. If so, would you be able to supply a newer commit SHA?