"XcodeBuildChecker: For the Projects SwiftPM Can't See"

quality-gate

2 min read

Not every Swift project is a clean SwiftPM package. This checker drives xcodebuild for the ones that aren’t — and generates the IndexStore the deeper auditors need.


XcodeBuildChecker is opt-in — excluded from default runs unless you explicitly ask for it — because it’s for a specific situation: a project that’s an .xcodeproj/.xcworkspace rather than a plain SwiftPM package, or one that needs a real Xcode build to produce a usable IndexStore.

Two jobs

That’s why it’s paired with the --auto-build-xcode flag: when an index-backed checker needs a fresh IndexStore and finds a stale one, the gate can drive xcodebuild to regenerate it rather than running against data it can’t trust.

Why opt-in

An xcodebuild invocation is slow and environment-specific — it shouldn’t run on every fast local gate. Keeping it opt-in (like disk-clean) means the default gate stays fast, and the heavier Xcode path runs only when a project actually needs it. Right tool, right cadence, explicit choice.

Try it

quality-gate --check xcode-build
quality-gate --check unreachable --auto-build-xcode    # regenerate the index if stale

Source: github.com/jpurnell/quality-gate-swift


Tagged with: quality-gate, specialty, swift