Repository navigation
ci: warn on new unused code in pull requests (Periphery baseline) - #74
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Paul
Keeps dead code from coming back after the Periphery pass.
.github/workflows/periphery.ymlgains 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.jsonrecords 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.jsonrecords 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).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-26job 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