Repository navigation
Fix periphery's stale-index false positives and shellcheck SC1091 in single-file runs - #376
Merged
Merged
Conversation
Periphery keeps its DerivedData between runs, and an index unit whose output is no longer produced is never replaced. After #315 that left a pre-redesign unit for TermField.swift in the store, so every local ios-check reported TermField and Caret as unused (at the old file's line numbers) though BlurtToolbar uses both. A clean build drops the stale units; CI's fresh runners were unaffected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A repo-root .shellcheckrc (external-sources + source-path SCRIPTDIR and SCRIPTDIR/..) lets shellcheck follow `source "$REPO_ROOT/scripts/…"` and the hooks' `source "$(dirname "$0")/hook-lib.sh"` when one script is linted alone, so an editor or a single-file run no longer raises SC1091 notes that check.sh's all-at-once invocation hides. Co-Authored-By: Claude Opus 5.5 <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.
Tooling fixes found while verifying #347–#349. No app code changes.
Periphery reported live code as unused (
TermField,Caret)Every local
scripts/ios-check.sh(so every localcheck.sh) failed periphery onmain:Both are used (
BlurtToolbar.swift:25). The line numbers are from the file before #315; today they are declared on lines 9 and 52. Periphery keeps its DerivedData in~/Library/Caches/com.github.peripheryapp, and an index unit whose output is no longer produced is never replaced, so the scan read a stale pre-#315 declaration with none of today's references. With--clean-buildthe same scan reports "No unused code detected." CI's fresh runners were unaffected, which is why this only showed up locally. (Everymaincheckrun since #315 was cancelled, so CI never ran periphery on it either.)SC1091 when shellcheck lints one script alone
A repo-root
.shellcheckrc(external-sources=true,source-path=SCRIPTDIR,source-path=SCRIPTDIR/..) makessource "$REPO_ROOT/scripts/…"and the hooks'source "$(dirname "$0")/hook-lib.sh"resolve in any invocation (an editor, a single file, any working directory), not only incheck.sh's one run over all the scripts. The explanations in CLAUDE.md andcheck.share updated.scripts/check.sh --portablepasses.🤖 Generated with Claude Code