Skip to content

ci: warn on new unused code in pull requests (Periphery baseline) - #74

Merged
Paullo9 merged 1 commit into
mainfrom
ci/periphery-pr-check
Nov 6, 2026
Merged

Paullo9 merged 1 commit into
mainfrom
ci/periphery-pr-check

Conversation

@Paullo9

@Paullo9 Paullo9 commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Requested by Paul

Keeps dead code from coming back after the Periphery pass.

  • .github/workflows/periphery.yml gains a pull-request job, New unused code (warning only). It runs when a PR touches Swift, scans as the weekly job does, and leaves out what .periphery-baseline.json records and Codable properties (test fixtures). A finding that is left is new: it is annotated on the PR as a warning. The job stays green, so it blocks nothing.
  • .periphery-baseline.json records the findings that were triaged and kept in the pass (not dead code: public API, GPU parameter blocks, fields read by synthesized conformances, generated constants).
  • The weekly scan and its issue are unchanged.

When the job warns: delete the code, or for a real false positive write the baseline again in the same PR (the two commands are in the workflow's header).

Cost: one more macos-26 job of about two minutes on PRs that touch Swift.

This PR runs the new job on itself; it reports 0 new findings when the baseline matches CI's toolchain.

🤖 Generated with Claude Code

The Periphery workflow gains a pull-request job that scans as the weekly job does, without the findings
.periphery-baseline.json records (triaged and kept in the dead-code pass) and without Codable properties. A finding
that is left is new and is annotated on the PR as a warning; the job stays green. The weekly scan is unchanged.

Done: the warning-only check and its baseline. Next: make it a required check once it has stayed quiet for two weeks.

Co-Authored-By: Claude <noreply@anthropic.com>
@Paullo9 Paullo9 self-assigned this Nov 6, 2026
@Paullo9
Paullo9 merged commit 571beb8 into main Nov 6, 2026
8 checks passed
@Paullo9
Paullo9 deleted the ci/periphery-pr-check branch November 6, 2026 14:10
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.

1 participant