swift/coverage
Measures each source target in Xcode projects and Swift packages against coverage.lines and its coverage.swift_target floor.
Part of the swift configuration, at the recommended level. It runs at the push stage, once per scope. gspot runs this check itself. It needs a build of the project. It runs on macOS and Linux.
A floor for each target exposes Swift code that no test runs.
What to do
Section titled “What to do”Add tests for the target, or lower its floor with a reason.
Example
Section titled “Example”A Swift target reports 85% line coverage against a 90% floor. Add a test that exercises its uncovered lines, then rerun the target.
Turn it off
Section titled “Turn it off”Turn it off for some files, with a reason:
gspot ignore swift/coverage --paths "<glob>" --reason "<why>"