From 822b3ef5d24e8d2b2638d0fc57747baf11b3156d Mon Sep 17 00:00:00 2001 From: Tim Morgan Date: Tue, 19 May 2026 13:02:59 -0700 Subject: [PATCH 1/2] Add Periphery config and CI workflow; remove dead code Adds .periphery.yml and .github/workflows/periphery.yml, and removes unused declarations/imports flagged by Periphery. Codable/@objc/reflection/protocol-witness symbols retained. Build passes with no regressions. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/periphery.yml | 14 ++++++++++++++ .periphery.yml | 1 + Sources/lib/GameFinder.swift | 1 - Sources/lib/Games.swift | 5 ----- 4 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/periphery.yml create mode 100644 .periphery.yml diff --git a/.github/workflows/periphery.yml b/.github/workflows/periphery.yml new file mode 100644 index 0000000..48ab9c1 --- /dev/null +++ b/.github/workflows/periphery.yml @@ -0,0 +1,14 @@ +name: Periphery +on: + push: + branches: [main] + pull_request: +jobs: + periphery: + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + - name: Install Periphery + run: brew install peripheryapp/periphery/periphery + - name: Run Periphery + run: periphery scan diff --git a/.periphery.yml b/.periphery.yml new file mode 100644 index 0000000..251ebc2 --- /dev/null +++ b/.periphery.yml @@ -0,0 +1 @@ +retain_public: false diff --git a/Sources/lib/GameFinder.swift b/Sources/lib/GameFinder.swift index 60586b3..d093b3d 100644 --- a/Sources/lib/GameFinder.swift +++ b/Sources/lib/GameFinder.swift @@ -177,7 +177,6 @@ actor GameFinder { var fourtiles: [String] var count: Int { fourtiles.count } - var isEmpty: Bool { fourtiles.isEmpty } init(fourtiles: Set) { self.fourtiles = Array(fourtiles) diff --git a/Sources/lib/Games.swift b/Sources/lib/Games.swift index 8b75c00..dc769d1 100644 --- a/Sources/lib/Games.swift +++ b/Sources/lib/Games.swift @@ -12,11 +12,6 @@ struct Game: Codable { /// All other words that can be formed by combinations of the tiles. let otherWords: Set - /// The ``fourtiles`` and ``otherWords`` combined. - var words: Set { - fourtiles.union(otherWords) - } - func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) From 70999f29a5aecc0d9075fc67aef1409a1133a8d9 Mon Sep 17 00:00:00 2001 From: Tim Morgan Date: Tue, 19 May 2026 14:51:54 -0700 Subject: [PATCH 2/2] Fix Periphery CI: set up matching Swift/Xcode toolchain; use homebrew-core periphery formula Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/periphery.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/periphery.yml b/.github/workflows/periphery.yml index 48ab9c1..10f86cf 100644 --- a/.github/workflows/periphery.yml +++ b/.github/workflows/periphery.yml @@ -5,10 +5,17 @@ on: pull_request: jobs: periphery: - runs-on: macos-latest + name: Run Periphery + runs-on: macos-26 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 + - uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: "26.4" + - uses: SwiftyLab/setup-swift@latest + with: + swift-version: "6.3" - name: Install Periphery - run: brew install peripheryapp/periphery/periphery + run: brew install periphery - name: Run Periphery run: periphery scan