Open mildm8nnered opened 1 year ago
xcrun llvm-cov report ./Build/Products/Debug/swiftlint -instr-profile ./Build/ProfileData/B0BFD85A-E8E4-510B-B453-151468BBD21C/Coverage.profdata
produces sensible output ...
Any thoughts on this @SimplyDanny @jpsim - I would love to have code coverage working - I find it really useful in detail to make sure that I have good test coverage of specific code branches - I don't care about the headline numbers much per se.
I cannot say much about Xcode. For about half a year, I've worked on SwiftLint in VS Code only. The Swift extension got very good and is getting regular updates due to Apple now also investing in it. Especially coverage works quite well.
I cannot say much about Xcode. For about halt a year, I've worked on SwiftLint in VS Code only. The Swift extension got very good and is getting regular updates due to Apple now also investing in it.
Believe me no-one hates Xcode more than I do.
Especially coverage works quite well.
That's just rubbing salt in the wound :-)
I guess I'll just try to dig in some more. Coverage definitely worked at one point.
New Issue Checklist
Describe the bug
When I enable code coverage in the swiftlint scheme, I only get coverage data for the test targets.
Steps to replicate:
1) Open SwiftLint in Xcode 2) Edit Scheme -> Test -> Options - enable code coverage 3) Switch to the Test Navigator (Command-6) 4) Run the Generated Tests 5) Switch to the Report Navigator (Command-9), and select the latest Coverage report
Observed: Only coverage data for the test targets is shown Expected: Coverage data for all targets should be displayed (and by default, test targets should be excluded).
Not sure exactly when this broke - possibly during the recent re-organization.
Complete output when running SwiftLint, including the stack trace and command used
N/A
Environment
swiftlint version
to be sure)?main
N/A
No
xcodebuild -version
)?Xcode 14.2 Build version 14C18
echo "[string here]" | swiftlint lint --no-cache --use-stdin --enable-all-rules
to quickly test if your example is really demonstrating the issue. If your example is more complex, you can useswiftlint lint --path [file here] --no-cache --enable-all-rules
.N/A