-
-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Environment
- Codecov CLI version: Latest
- Language: Swift
- Coverage format: Cobertura XML (generated from Xcode)
Steps to Reproduce
- Create a Swift file with comments inside a function
- Run your test suite and generate coverage reports
- Upload the coverage report to Codecov using the CLI
- View the pull request coverage report
Expected Result
Comments should be excluded from coverage calculations regardless of where they appear in the file. Whether a comment is inside or outside a function, it should not be counted as a "coverable line" or show up as "uncovered."
Actual Result
Comments inside functions are marked as uncovered lines and show up in the coverage report as missing coverage (see screenshot). This makes it look like there's missing test coverage when there isn't.
However, if you move the exact same comments outside the function, they are correctly excluded from the coverage report and don't appear at all.
Screenshot:

Metadata
Metadata
Assignees
Labels
No labels