Skip to content

Silence unused-result warnings on createMockProfile#51

Merged
diogot merged 1 commit into
mainfrom
chore/discardable-mock-profile
May 26, 2026
Merged

Silence unused-result warnings on createMockProfile#51
diogot merged 1 commit into
mainfrom
chore/discardable-mock-profile

Conversation

@diogot

@diogot diogot commented May 26, 2026

Copy link
Copy Markdown
Owner

Summary

Adds @discardableResult to ProvisionServiceTests.createMockProfile. Roughly a dozen call sites in ProvisionServiceTests.swift invoke it for the side effect (writing a mock .mobileprovision file) and discard the returned path. Under Swift 6.2 strict diagnostics each emits a [#no-usage] warning. One-character change to the helper silences all of them — confirmed locally: XprojectTests builds with zero warnings after.

Test plan

  • swift build --target XprojectTests — clean, no warnings
  • swift test --filter ProvisionService — still passes
  • Validate that the claude-code-review workflow now produces a useful review (this is the first PR after Broaden tool allowlist for claude-code-review workflow #50 merged — the real point of opening it)

Several ProvisionServiceTests call createMockProfile only for its side
effect (the file it writes) and discard the returned path. Each call
emitted a [#no-usage] warning under Swift 6.2 strict diagnostics. Add
@discardableResult to the helper so callers that don't need the path
no longer trip the warning.
Copilot AI review requested due to automatic review settings May 26, 2026 22:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the ProvisionServiceTests helper createMockProfile to silence Swift 6.2 strict diagnostics warnings at call sites that intentionally ignore its returned path, while still keeping the return value available for callers that do use it.

Changes:

  • Add @discardableResult to ProvisionServiceTests.createMockProfile(...) to suppress unused-result warnings in tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@diogot diogot merged commit 209c052 into main May 26, 2026
3 checks passed
@diogot diogot deleted the chore/discardable-mock-profile branch May 26, 2026 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants