Repository navigation
refactor: remove unused imports and unreachable code (Periphery pass) - #78
Merged
Merged
Conversation
Code that nothing reaches, found with Periphery (--retain-public). No public API changes; nothing the shell draws or does changes. - 5 unused imports (2 in Sources, 3 in tests) - EDXRegionBridge.apply(_:to:from:state:), package-level and called by nothing (the room drives the session through select, deleteSelected and the row callbacks) - EDXSession.loadPins(_:), package-level and called by nothing - EDSNumberFormat.signed, EDXRoomFormat.progressBarWidth, and the private inMixNow and selectable of the maps tile Periphery: 25 findings before, 14 after; the rest are fields Equatable and Hashable read, two unread inputs and one false positive (a State used through its binding). Done: the dead-code pass for this repo, 316 tests green. Next: a PR check against a Periphery baseline so new dead code is caught. 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
What this changes
Removes code that nothing reaches, found with Periphery (
--retain-public, the weekly scan's own command). No public API changes and nothing the shell draws or does changes.EDXRegionBridge.apply(_:to:from:state:), package-level and called by nothing (the room drives the session throughselect,deleteSelectedand the row callbacks)EDXSession.loadPins(_:), package-level and called by nothingEDSNumberFormat.signed,EDXRoomFormat.progressBarWidth, and the privateinMixNowandselectableof the maps tilePeriphery findings: 25 before, 14 after. What is left is not dead code:
MetalImageView.AppliedState, whichEquatablecompares to decide a redrawRowIdentity, whichHashablereadsisAnchorandupperinEDXMapsBlock, inputs that are assigned and not read yetdropTargetedinShellWindow, a false positive: it is used through its binding ($dropTargeted)How it was checked
swift test -c release --parallel: 316 tests, 0 failures, on the Mac--strictand SwiftFormat 0.64.4--lintpass🤖 Generated with Claude Code