Open iwasrobbed-ks opened 7 years ago
I am seeing this issue as well.
Having the same issue on my projects. Slather shows 28.78% while only 16.24% with xcode.
I'm also seeing a difference between Xcode % and Slather %. I am wondering if this is due to Xcode (at least on 9.3) counting partial line coverage correctly, while Slather considers a line covered if any part of the line is covered?
I'm seeing only a few files included in my coverage rather than all the files that don't have coverage. Here's my .slather.yml. This results in coverage of about 65% rather than something below 15%.
coverage_service: cobertura_xml xcodeproj: MyProject.xcodeproj workspace: MProject.xcworkspace source_directory: source/* output_directory: xml_report scheme: MyProject ignore:
Update: Tested using CircleCI Xcode 9.2, and I'm seeing the same issue. Slather code coverage results at 54% while coverage in Xcode shows closer to 13%.
Update: My previous project with an issue used Objective-C and was generating gcno coverage data. Testing with a Swift project seemed to work fine. Would still like this to work with my Objective-C code.
Xcode version: 9 GM
It appears Slather is only calculating coverage for the files it actually has tests for. This gives an unrealistically high code coverage % since it completely ignores all the untested code within the project.
Additionally, even the tested files have incorrect coverage #'s. All the
100%
files shown by Slather below are wrong.Xcode gives 85.8% whereas Slather gives 99.5%