fix(rust): implement DeadCodeDetector to unbreak main#8
Merged
Conversation
PR #7 added DeadCodeDetector() to lang.Language; PR #4 (Rust analyzer) branched from a pre-#7 main and merged without re-running CI on the merged result, breaking the build on main and any downstream go install ...@latest. Returning nil is the supported "no detector" path (internal/deadcode/deadcode.go:31 emits a PASS section explaining the language has no detector wired up). Co-Authored-By: Claude Opus 4.7 (1M context) <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.
Summary
*rustanalyzer.Languagewas missingDeadCodeDetector(), sogo install github.com/0xPolygon/diffguard/cmd/diffguard@latesthas been failing since cbf402d (2026-04-29). This broke downstream consumers — e.g. bor's Quality metrics CI.nilis the supported "no detector" path:internal/deadcode/deadcode.go:31already emits a PASS section explaining the language has no detector wired up.Why this slipped through
PR #7 added
DeadCodeDetector()tolang.Languageand updated Go + TS. PR #4 (Rust analyzer) branched from a pre-#7mainand merged second with no textual conflict — its CI never saw the merged combination, and main's post-merge CI run (25134342922) failed silently. Worth enabling "require branches up to date before merge" to prevent the same semantic conflict pattern.Test plan
make buildcleanmake testall green (incl.internal/lang/rustanalyzer)./diffguard .exits 0🤖 Generated with Claude Code