Context
A full rebuild of every source and test file emits exactly one warning across the whole project:
Sources/ScanDeckApp/ScanDeckPresentationModel.swift:2775:19: warning: value 'cardID' was defined but never used; consider replacing with boolean test [#no-usage]
One permanent warning trains everyone to ignore the whole channel — which is exactly the channel a new contributor needs to trust. A clean build is the cheapest possible signal that a new warning means something.
What to change
Sources/ScanDeckApp/ScanDeckPresentationModel.swift:2774-2779:
var otherBlockingPairMismatchCount: Int {
guard let cardID = cardPendingSizeAcceptanceConfirmation else {
return 0
}
...
}
Replace the binding with a nil test:
guard cardPendingSizeAcceptanceConfirmation != nil else {
return 0
}
Behaviour is unchanged — the binding is never read.
Leave line 2782 alone. confirmSizeAcceptance() has a visually identical guard let cardID = cardPendingSizeAcceptanceConfirmation and does use it — it passes cardID to the reducer action. Changing that one breaks the operator's per-card size-mismatch override, which invariant #2 depends on.
How to verify
touch Sources/ScanDeckApp/ScanDeckPresentationModel.swift
swift build 2>&1 | grep warning # should print nothing
swift test -c release # 251 tests in 29 suites
See CONTRIBUTING.md — branch, run the suite, open a PR against main. No scanner needed.
Context
A full rebuild of every source and test file emits exactly one warning across the whole project:
One permanent warning trains everyone to ignore the whole channel — which is exactly the channel a new contributor needs to trust. A clean build is the cheapest possible signal that a new warning means something.
What to change
Sources/ScanDeckApp/ScanDeckPresentationModel.swift:2774-2779:Replace the binding with a nil test:
Behaviour is unchanged — the binding is never read.
Leave line 2782 alone.
confirmSizeAcceptance()has a visually identicalguard let cardID = cardPendingSizeAcceptanceConfirmationand does use it — it passescardIDto the reducer action. Changing that one breaks the operator's per-card size-mismatch override, which invariant #2 depends on.How to verify
See CONTRIBUTING.md — branch, run the suite, open a PR against
main. No scanner needed.